![]() |
VR-Forces Developer's Guide
|
Parameters for a single projectile burst fired via DtOsgBallisticManager.
Bundles the firing entity ID, muzzle position and velocity, burst count, rate of fire, and bullet definition into a single value object.
Public Member Functions | |
| DtBallisticFireRequest () | |
| virtual | ~DtBallisticFireRequest () |
| virtual const DtUniqueID & | uniqueId () const |
| virtual void | setUniqueId (const DtUniqueID &uniqueId) |
| virtual const Vector3_64 & | position () const |
| virtual void | setPosition (const Vector3_64 &position) |
| virtual const Vector3_64 & | velocity () const |
| virtual void | setVelocity (const Vector3_64 &velocity) |
| virtual double | range () const |
| virtual void | setRange (double range) |
| virtual double | rateOfFire () const |
| virtual void | setRateOfFire (double rateOfFire) |
| virtual int | count () const |
| virtual void | setCount (int count) |
| virtual const DtBulletDefinition & | definition () const |
| virtual void | setDefinition (const DtBulletDefinition &definition) |
| virtual const std::string & | proximitySoundGroup () const |
| virtual void | setProximitySoundGroup (const std::string &name) |
| virtual float | localWindSpeed () const |
| virtual float | localWindDirection () const |
| virtual void | setLocalWindSpeed (float speedMps) |
| virtual void | setLocalWindDirection (float directionRad) |
Protected Attributes | |
| DtUniqueID | myUniqueId |
| Vector3_64 | myPosition |
| Vector3_64 | myVelocity |
| double | myRange |
| double | myRateOfFire |
| int | myCount |
| DtBulletDefinition | myDefinition |
| std::string | myProximitySoundGroup |
| float | myLocalWindSpeed |
| float | myLocalWindDirection |
| makVrv::DtBallisticFireRequest::DtBallisticFireRequest | ( | ) |
Constructs with default-initialized fields.
|
virtual |
Virtual destructor.
|
virtual |
Returns the unique identifier for this fire request.
|
virtual |
Sets the unique identifier for this fire request.
| uniqueId | New unique ID. |
|
virtual |
Returns the world-space muzzle position at fire time.
|
virtual |
Sets the world-space muzzle position at fire time.
| position | World-space position in meters. |
|
virtual |
Returns the world-space initial velocity vector (m/s).
|
virtual |
Sets the world-space initial velocity vector (m/s).
| velocity | World-space velocity vector; magnitude encodes muzzle speed. |
|
virtual |
Returns the maximum travel distance override (meters); 0 defers to the bullet definition.
|
virtual |
Sets the maximum travel distance override.
| range | Distance in meters; pass 0 to defer to the bullet definition's maxDistance(). |
|
virtual |
Returns the rate of fire in rounds per second; must be > 0.
|
virtual |
Sets the rate of fire in rounds per second.
| rateOfFire | Rate in rounds per second; must be > 0. |
|
virtual |
Returns the number of rounds in the burst; must be >= 1.
|
virtual |
Sets the number of rounds in the burst.
| count | Number of rounds; must be >= 1. |
|
virtual |
Returns the bullet definition.
|
virtual |
Sets the bullet definition.
| definition | Bullet characteristics to copy. |
|
virtual |
Returns the proximity sound group for this burst.
Names a DtBallisticSoundGroup defined in DtBallisticSoundSettingsRecord::myGroups. An empty string means no proximity sound will play for this burst.
|
virtual |
Sets the per-burst proximity sound group.
| name | Group name; must match a DtBallisticSoundGroup::myName in the settings record, or empty for no proximity sound. |
|
virtual |
Returns the local wind speed override for this burst (m/s).
A value less than 0 (the default, -1.0) means no local override; the global UBO wind is used instead.
|
virtual |
Returns the local wind bearing override for this burst (radians, clockwise from north).
Only meaningful when localWindSpeed() >= 0.0.
|
virtual |
Sets the local wind speed override.
| speedMps | Wind speed in m/s. Pass a negative value to revert to global UBO wind. |
|
virtual |
Sets the local wind bearing override.
| directionRad | Wind bearing in radians, clockwise from north. |
|
protected |
Unique identifier for this fire request.
|
protected |
World-space muzzle position at fire time (meters).
|
protected |
World-space initial velocity vector (m/s); direction encodes bearing, magnitude encodes muzzle speed.
|
protected |
Maximum travel distance override (meters); 0 defers to the bullet definition.
|
protected |
Rate of fire in rounds per second; must be > 0.
|
protected |
Number of rounds in the burst; must be >= 1.
|
protected |
Bullet characteristics for this fire request.
|
protected |
Per-burst proximity sound group; empty string means no proximity sound.
|
protected |
Local wind speed override (m/s); -1.0 means use the global UBO wind.
|
protected |
Local wind bearing override (radians, clockwise from north); valid when myLocalWindSpeed >= 0.0.