![]() |
VR-Vantage 3.1 API Documentation
|
Copyright JRM Enterprises, Inc. More...
Classes | |
| struct | ssShipWakePoint |
| Structure to hold a single ship wake sample point. More... | |
Public Member Functions | |
| ssShipWake () | |
| Default Constructor. | |
| ssShipWakePoint * | getWakePoints () |
| Get a pointer to the array of wake points. | |
| void | setNumPoints (int numPoints) |
| Set the number of wake points that this class should maintain. | |
| int | getNumPoints () |
| Get the number of wake points that are in the array of wake points that this class returns when getWakePoints() is called. | |
| void | setOffset (float x, float y) |
| Set the offset amount, measured from the center of the ship, that the wake should emanate or start from. | |
| void | getOffset (float &x, float &y) |
| Get the offset amount, measured from the center of the ship, that the wake is emanated or starts from. | |
| void | setWidth (float initial, float maximum) |
| Each new wake point will start with the initial width and will expand over time until it reaches the maximum width. | |
| void | getWidth (float &initial, float &maximum) |
| Get the initial and maximum width values that are being used. | |
| void | setTimeOfMaxWidth (float time) |
| Set the amount of time that any point of the ship wake should continue to expand. | |
| float | getTimeOfMaxWidth () |
| Get the time at which a wake point will have reached its maximum width and will no longer expand. | |
| void | setTimeAlphaBegins (float time) |
| Set the time at which a wake point will go from being 100% opaque to starting to become transparent. | |
| float | getTimeAlphaBegins () |
| Get the time at which the linear transition from 100% opaque to 100% transparent begins. | |
| void | setTextureFlowRate (float unitsPerSecond) |
| Set the number of texture units that flow past the leading edge of the wake in one second. | |
| float | getTextureFlowRate () |
| Get the number of texture units that flow past the leading edge of the wake in one second. | |
| void | update (double x, double y, double z, double heading, double pitch, double roll, double time) |
| Update the position and orientation of the ship without any wave motion. | |
Private Member Functions | |
| void | pushRight () |
| Move all the data in the array of wake points to the right one location. | |
| void | initializeData (int numPoint) |
| Create and/or zero out the wake point data that this class uses. | |
Private Attributes | |
| ssShipWakePoint * | m_wakePoints |
| double | m_previousPosX |
| double | m_previousPosY |
| float | m_wakeOffsetX |
| float | m_wakeOffsetY |
| float | m_initialWidth |
| float | m_maximumWidth |
| float | m_timeOfMaxWidth |
| float | m_timeAlphaBegins |
| float | m_textureFlowRate |
| float | m_textureOffset |
| int | m_numPoints |
Copyright JRM Enterprises, Inc.
This code is the intellectual property of JRM Enterprises, Inc. It may not be used or released as source or compiled binary form without the prior written consent of JRM Enterprises, Inc. ...text...
| ssShipWake::ssShipWake | ( | ) |
Default Constructor.
| ssShipWakePoint* ssShipWake::getWakePoints | ( | ) |
Get a pointer to the array of wake points.
Use the getNumPoints() method to determine how many wake points in in this array.
Set the number of wake points that this class should maintain.
This class will creat ONE new wake at the head of the wake and remove ONE wake point from the tail every second. So, the number of points also defines the number of seconds that any wake point will be visitable.
|
inline |
Get the number of wake points that are in the array of wake points that this class returns when getWakePoints() is called.
|
inline |
Set the offset amount, measured from the center of the ship, that the wake should emanate or start from.
|
inline |
Get the offset amount, measured from the center of the ship, that the wake is emanated or starts from.
|
inline |
Each new wake point will start with the initial width and will expand over time until it reaches the maximum width.
Maximum width will occur at the time set by using the setTimeOfMaxWidth() method.
|
inline |
Get the initial and maximum width values that are being used.
|
inline |
Set the amount of time that any point of the ship wake should continue to expand.
After this amount of time has passed for a wake point, it will no longer change size and will be at its final or maximum width.
|
inline |
Get the time at which a wake point will have reached its maximum width and will no longer expand.
|
inline |
Set the time at which a wake point will go from being 100% opaque to starting to become transparent.
Wake points will always be 100% transparent before they are removed from the end of the wake. This value sets the time at which the linear transition from 100% opaque to 100% transparent begins.
|
inline |
Get the time at which the linear transition from 100% opaque to 100% transparent begins.
|
inline |
Set the number of texture units that flow past the leading edge of the wake in one second.
This will effect how stretched or compressed the texture will look from the beginning to the end of the wake. If the flow rate is set to 0.25, the wake texture will repeat every 4 seconds. If set to 2.0, the wake texture will repeat every 0.5 seconds.
|
inline |
Get the number of texture units that flow past the leading edge of the wake in one second.
| void ssShipWake::update | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | heading, | ||
| double | pitch, | ||
| double | roll, | ||
| double | time | ||
| ) |
Update the position and orientation of the ship without any wave motion.
This should be the calm sea position and orientation of the ship
|
private |
Move all the data in the array of wake points to the right one location.
The data in array location 0 and 1 will be the same upon return and the data that was in the last array location will no longer exist.
Create and/or zero out the wake point data that this class uses.
If the number of points passed in does not match the number of points that are currently being used, the current wake points will be freed and new ones allocated.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |