Osiris Framework  0.3
OVector4 Class Reference

Represents four-dimentional vectors. More...

#include <OsirisSDK/OMath.h>

Inheritance diagram for OVector4:
OMathPrimitive< glm::vec4 >

Public Types

enum  Axis { X = 0, Y, Z, W }
 

Public Member Functions

 OVector4 ()
 Class constructor.
 
 OVector4 (const OVector4 &in)
 Class copy constructor.
 
 OVector4 (float val)
 Class constructor. More...
 
 OVector4 (float vx, float vy, float vz, float vw)
 Class constructor. More...
 
 OVector4 (const OVector3 &vec3, float vw=0.0f)
 Class constructor. More...
 
 OVector4 (const OMathPrimitive< glm::vec4 > &in)
 Class copy constructor for the base template class.
 
virtual ~OVector4 ()
 Class destructor.
 
float & operator[] (Axis axis)
 
void setX (float val)
 Set the value for the X axis component.
 
void setY (float val)
 Set the value for the Y axis component.
 
void setZ (float val)
 Set the value for the Z axis component.
 
void setW (float val)
 Set the value for the W axis component.
 
float x () const
 Returns the value of the X axis component.
 
float y () const
 Returns the value of the Y axis component.
 
float z () const
 Returns the value of the Z axis component.
 
float w () const
 Returns the value of the W axis component.
 
- Public Member Functions inherited from OMathPrimitive< glm::vec4 >
 OMathPrimitive ()
 Class constructor.
 
 OMathPrimitive (const OMathPrimitive< glm::vec4 > &in)
 Copy constructor.
 
virtual ~OMathPrimitive ()
 Class destructor.
 
OMathPrimitive< glm::vec4 > normalize ()
 Creates a normalized object out of the current one.
 
OMathPrimitive< glm::vec4 > & operator= (const OMathPrimitive< glm::vec4 > &in)
 
OMathPrimitive< glm::vec4 > & operator*= (const OMathPrimitive< glm::vec4 > &in)
 
OMathPrimitive< glm::vec4 > & operator*= (float x)
 
OMathPrimitive< glm::vec4 > operator* (const OMathPrimitive< glm::vec4 > &in) const
 
virtual OMathPrimitive< glm::vec4 > operator* (float x) const
 
OMathPrimitive< glm::vec4 > & operator+= (const OMathPrimitive< glm::vec4 > &in)
 
OMathPrimitive< glm::vec4 > operator+ (const OMathPrimitive< glm::vec4 > &in) const
 
OMathPrimitive< glm::vec4 > & operator-= (const OMathPrimitive< glm::vec4 > &in)
 
OMathPrimitive< glm::vec4 > operator- (const OMathPrimitive< glm::vec4 > &in) const
 
bool operator== (const OMathPrimitive< glm::vec4 > &in) const
 
bool operator!= (const OMathPrimitive< glm::vec4 > &in) const
 
const GLfloat * glArea () const
 Returns a pointer to the memory area to be used by OpenGL. For internal library usage only.
 

Additional Inherited Members

- Protected Attributes inherited from OMathPrimitive< glm::vec4 >
glm::vec4 _glmInternal
 

Detailed Description

Represents four-dimentional vectors.

Constructor & Destructor Documentation

OVector4::OVector4 ( float  val)

Class constructor.

Creates a OVector4 with all components with the same value.

Parameters
valThe value to be used by all of the three components.
OVector4::OVector4 ( float  vx,
float  vy,
float  vz,
float  vw 
)

Class constructor.

Creates a OVector4 taking in the values for each component.

OVector4::OVector4 ( const OVector3 vec3,
float  vw = 0.0f 
)

Class constructor.

Creates a OVector4 from a OVector3 object, in which the X,Y and Z components will receive the values from the three-dimensional vectors.


The documentation for this class was generated from the following files: