-
Notifications
You must be signed in to change notification settings - Fork 2
DataTypes: Vector3.hpp
Alanzote edited this page Dec 25, 2018
·
1 revision
A Vector3 is used for object positioning in the world of LEGO Universe. It consists of 3 float
values: X, Y, and Z. A good explanation of vector arithmetics can be found on Unity's Docs.
- No Parameters
- Constructs an Empty Vector3.
-
Vector
Base- Constructs a vector with another one as base.
-
float
x,float
y,float
z- Constructs a vector with x, y and z values.
-
float
a- Constructs a vector with a single value.
-
RakNet::BitStream*
bs- Constructs a vector by reading it from a bit stream.
- sqrMagnitude
- Return Type:
float
- Comment: Return the sqrMagnitude of this vector.
- Return Type:
- magnitude
- Return Type:
float
- Comment: Returns the magnitude of this vector.
- Return Type:
- normalized
- Return Type:
Vector3
- Comment: Returns this vector, normalized.
- Return Type:
- equals
- Return Type:
bool
- Input Type:
Vector3
- Comment: Weather a Vector3 is equal another Vector3.
- Return Type:
- equals
- Return Type:
bool
- Input Type:
float
- Comment: Weahter a vector has the same value for it's 3 axis.
- Return Type:
- set
- Return Type:
void
- Input Types:
float
x,float
y,float
z - Comment: Sets the x, y and z values of a vector.
- Return Type:
- toString
- Return Type:
std::string
- Comment: Formats this Vector3 into a string representation.
- Return Type:
- normalize
- Return Type:
float
- Input Type:
bool
inverse - Comment: Normalizes the vector.
- Return Type:
- Dot
- Return Type:
float
- Input Types:
Vector3
,Vector3
- Comment: Returns the dot product between two vectors.
- Return Type:
- Cross
- Return Type:
Vector3
- Input Types:
Vector3
,Vector3
- Comment: Returns the cross between two vectors.
- Return Type:
- Angle
- Return Type:
float
- Input Types:
Vector3
,Vector3
- Comment: Returns the angle between two vectors.
- Return Type:
- ClampMagnitude
- Return Type:
Vector3
- Input Types:
Vector3
vector,float
max length - Comment: Clamps the vector's magnitude up to a max length.
- Return Type:
- Distance
- Return Type:
float
- Input Types:
Vector3
,Vector3
- Comment: Returns the distance between two vectors.
- Return Type:
- Lerp
- Return Type:
Vector3
- Input Types:
Vector3
a,Vector3
b,float
t - Comment: Lerps a vector to another by a rate. (clamped)
- Return Type:
- LerpUncampled
- Return Type:
Vector3
- Input Types:
Vector3
a,Vector3
b,float
t - Comment: Lerps a vector to another by a rate. (unclamped)
- Return Type:
- Max
- Return Type:
Vector3
- Input Types:
Vector3
,Vector3
- Comment: Returns the Max between two vectors.
- Return Type:
- Min
- Return Type:
Vector3
- Input Types:
Vector3
,Vector3
- Comment: Returns the Min between two vectors.
- Return Type:
- MoveTowards
- Return Type:
Vector3
- Input Types:
Vector3
current,Vector3
target,float
max distance delta - Comment: Moves a vector towards another.
- Return Type:
- Normalize
- Return Type:
Vector3
- Input Type:
Vector3
- Comment: Normalizes a vector.
- Return Type:
- RotateTowards
- Return Type:
Vector3
- Input Types:
Vector3
current,Vector3
target,float
max radians delta,float
max magnitude delta - Comment: Rotates a vector towards another.
- Return Type:
- Scale
- Return Type:
Vector3
- Input Types:
Vector3
,Vector3
- Comment: Scales a vector with another.
- Return Type:
- SignedAngle
- Return Type:
float
- Input Types:
Vector3
from,Vector3
to,Vector3
axis - Comment: Gets the signed angle between two vectors on an axis.
- Return Type:
- Slerp
- Return Type:
Vector3
- Input Types:
Vector3
,Vector3
,float
- Comment: Slerps a vector.
- Return Type:
- up
- Return Type:
Vector3
- Comment: Static Vector3 that points up.
- Return Type:
- down
- Return Type:
Vector3
- Comment: Static Vector3 that points down.
- Return Type:
- forward
- Return Type:
Vector3
- Comment: Static Vector3 that points forward.
- Return Type:
- back
- Return Type:
Vector3
- Comment: Static Vector3 that points backward.
- Return Type:
- left
- Return Type:
Vector3
- Comment: Static Vector3 that points to the left.
- Return Type:
- right
- Return Type:
Vector3
- Comment: Static Vector3 that points to the right.
- Return Type:
- positiveInfinity
- Return Type:
Vector3
- Comment: Static Vector3 that points to positive infinity.
- Return Type:
- negativeInfinity
- Return Type:
Vector3
- Comment: Static Vector3 that points to negative infinity.
- Return Type:
- one
- Return Type:
Vector3
- Comment: Static Vector3 that has all 3 properties with static value of 1.
- Return Type:
- zero
- Return Type:
Vector3
- Comment: Static Vector3 that has all 3 properties with static value of 0.
- Return Type:
Vector3 supports the following operators: +
(float
and Vector3
), -
(float
, Vector3
), *
(float
, Vector3
), /
(float
, Vector3
), +=
(float
, Vector3
), -=
(float
, Vector3
), *=
(float
, Vector3
), /=
(float
, Vector3
), ==
(float
, Vector3
), !=
(float
, Vector3
), []
(for accessbility, array operator to access x, y and z).
- Home
- Common
- Data Types
- Enums
- Entity
- Components
- Interface
- GameObject.hpp
- Components
- File Types
- Game Cache
- Interface
- BehaviorParameter.hpp