CUGL 2.0
Cornell University Game Library
Namespaces | Classes | Typedefs | Enumerations | Functions
cugl Namespace Reference

Namespaces

 audio
 
 filetool
 
 physics2
 
 poly2
 
 scene2
 
 strtool
 

Classes

class  AccelerationEvent
 
class  Accelerometer
 
class  Affine2
 
class  Aligned
 
class  Application
 
class  Asset
 
class  AssetManager
 
class  AudioDevices
 
class  AudioEngine
 
class  AudioQueue
 
class  AudioSample
 
class  AudioWaveform
 
class  BaseLoader
 
class  BinaryReader
 
class  BinaryWriter
 
class  ButtonState
 
class  Camera
 
class  Color4
 
class  Color4f
 
class  ComplexExtruder
 
class  ComplexTriangulator
 
class  Display
 
class  EasingBezier
 
class  EasingFunction
 
class  Font
 
class  FontLoader
 
class  FreeList
 
class  Frustum
 
class  GenericLoader
 
class  Geometry
 
class  Gradient
 
class  GreedyFreeList
 
class  Input
 
class  InputDevice
 
class  JsonLoader
 
class  JsonReader
 
class  JsonValue
 
class  JsonWriter
 
class  Keyboard
 
struct  KeyCodeHasher
 
class  KeyEvent
 
class  Loader
 
class  Mat4
 
class  Mesh
 
class  Mouse
 
class  MouseEvent
 
class  MouseWheelEvent
 
class  OrthographicCamera
 
class  PanEvent
 
class  PanInput
 
class  PathSmoother
 
class  PerspectiveCamera
 
class  PinchEvent
 
class  PinchInput
 
class  Plane
 
class  Poly2
 
class  PolyFactory
 
class  Polynomial
 
class  PolySplineFactory
 
class  Quaternion
 
class  Ray
 
class  Rect
 
class  RenderTarget
 
class  RotationEvent
 
class  RotationInput
 
class  Scene2
 
class  Scene2Loader
 
class  Scene2Texture
 
struct  scheduable
 
class  Scissor
 
class  Shader
 
class  SimpleExtruder
 
class  SimpleTriangulator
 
class  Size
 
class  Sound
 
class  SoundLoader
 
class  Spline2
 
class  SpriteBatch
 
class  SpriteVertex2
 
class  SpriteVertex3
 
class  TextInput
 
class  TextInputEvent
 
class  TextReader
 
class  Texture
 
class  TextureLoader
 
class  TextWriter
 
class  ThreadPool
 
class  Timestamp
 
class  TouchEvent
 
class  Touchscreen
 
class  UniformBuffer
 
class  Vec2
 
class  Vec3
 
class  Vec4
 
class  VertexBuffer
 
class  WidgetLoader
 
class  WidgetValue
 

Typedefs

typedef std::function< void(const std::string &key, bool success)> LoaderCallback
 
typedef Sint64 TouchID
 
typedef Vec2 Point2
 
typedef Vec3 Point3
 

Enumerations

enum  KeyCode : int {
  KeyCode::NUM_0 = SDLK_0, KeyCode::NUM_1 = SDLK_1, KeyCode::NUM_2 = SDLK_2, KeyCode::NUM_3 = SDLK_3,
  KeyCode::NUM_4 = SDLK_4, KeyCode::NUM_5 = SDLK_5, KeyCode::NUM_6 = SDLK_6, KeyCode::NUM_7 = SDLK_7,
  KeyCode::NUM_8 = SDLK_8, KeyCode::NUM_9 = SDLK_9, KeyCode::A = SDLK_a, KeyCode::B = SDLK_b,
  KeyCode::C = SDLK_c, KeyCode::D = SDLK_d, KeyCode::E = SDLK_e, KeyCode::F = SDLK_f,
  KeyCode::G = SDLK_g, KeyCode::H = SDLK_h, KeyCode::I = SDLK_i, KeyCode::J = SDLK_j,
  KeyCode::K = SDLK_k, KeyCode::L = SDLK_l, KeyCode::M = SDLK_m, KeyCode::N = SDLK_n,
  KeyCode::O = SDLK_o, KeyCode::P = SDLK_p, KeyCode::Q = SDLK_q, KeyCode::R = SDLK_r,
  KeyCode::S = SDLK_s, KeyCode::T = SDLK_t, KeyCode::U = SDLK_u, KeyCode::V = SDLK_v,
  KeyCode::W = SDLK_w, KeyCode::X = SDLK_x, KeyCode::Y = SDLK_y, KeyCode::Z = SDLK_z,
  KeyCode::ARROW_DOWN = SDLK_DOWN, KeyCode::ARROW_LEFT = SDLK_LEFT, KeyCode::ARROW_RIGHT = SDLK_RIGHT, KeyCode::ARROW_UP = SDLK_UP,
  KeyCode::QUOTE = SDLK_QUOTE, KeyCode::BACKSLASH = SDLK_BACKSLASH, KeyCode::COMMA = SDLK_COMMA, KeyCode::EQUALS = SDLK_EQUALS,
  KeyCode::BACKQUOTE = SDLK_BACKQUOTE, KeyCode::LEFT_BRACKET = SDLK_LEFTBRACKET, KeyCode::MINUS = SDLK_MINUS, KeyCode::PERIOD = SDLK_PERIOD,
  KeyCode::RIGHT_BRACKET = SDLK_RIGHTBRACKET, KeyCode::SEMICOLON = SDLK_SEMICOLON, KeyCode::SLASH = SDLK_SLASH, KeyCode::BACKSPACE = SDLK_BACKSPACE,
  KeyCode::SPACE = SDLK_SPACE, KeyCode::TAB = SDLK_TAB, KeyCode::DEL = SDLK_DELETE, KeyCode::END = SDLK_END,
  KeyCode::ESCAPE = SDLK_ESCAPE, KeyCode::HOME = SDLK_HOME, KeyCode::HELP = SDLK_HELP, KeyCode::PAGE_DOWN = SDLK_PAGEDOWN,
  KeyCode::PAGE_UP = SDLK_PAGEUP, KeyCode::PAUSE = SDLK_PAUSE, KeyCode::RETURN = SDLK_RETURN, KeyCode::ENTER = SDLK_RETURN2,
  KeyCode::CAPS_LOCK = SDLK_CAPSLOCK, KeyCode::LEFT_ALT = SDLK_LALT, KeyCode::LEFT_CTRL = SDLK_LCTRL, KeyCode::LEFT_SHIFT = SDLK_LSHIFT,
  KeyCode::LEFT_META = SDLK_LGUI, KeyCode::RIGHT_ALT = SDLK_RALT, KeyCode::RIGHT_CTRL = SDLK_RCTRL, KeyCode::RIGHT_SHIFT = SDLK_RSHIFT,
  KeyCode::RIGHT_META = SDLK_RGUI, KeyCode::NUMLOCK = SDLK_NUMLOCKCLEAR, KeyCode::KEYPAD_0 = SDLK_KP_0, KeyCode::KEYPAD_1 = SDLK_KP_1,
  KeyCode::KEYPAD_2 = SDLK_KP_2, KeyCode::KEYPAD_3 = SDLK_KP_3, KeyCode::KEYPAD_4 = SDLK_KP_4, KeyCode::KEYPAD_5 = SDLK_KP_5,
  KeyCode::KEYPAD_6 = SDLK_KP_6, KeyCode::KEYPAD_7 = SDLK_KP_7, KeyCode::KEYPAD_8 = SDLK_KP_8, KeyCode::KEYPAD_9 = SDLK_KP_9,
  KeyCode::KEYPAD_CLEAR = SDLK_KP_CLEAR, KeyCode::KEYPAD_EQUALS = SDLK_KP_EQUALS, KeyCode::KEYPAD_DIVIDE = SDLK_KP_DIVIDE, KeyCode::KEYPAD_MULTIPLY = SDLK_KP_MULTIPLY,
  KeyCode::KEYPAD_MINUS = SDLK_KP_MINUS, KeyCode::KEYPAD_PLUS = SDLK_KP_PLUS, KeyCode::KEYPAD_ENTER = SDLK_KP_ENTER, KeyCode::UNKNOWN = SDLK_POWER
}
 
enum  KeyCategory {
  KeyCategory::NUMBER, KeyCategory::LETTER, KeyCategory::ARROW, KeyCategory::PUNCTUATION,
  KeyCategory::SPECIAL, KeyCategory::MODIFIER, KeyCategory::KEYPAD, KeyCategory::UNKNOWN
}
 

Functions

SDL_FORCE_INLINE Uint16 marshall (Sint16 value)
 
SDL_FORCE_INLINE Uint16 marshall (Uint16 value)
 
SDL_FORCE_INLINE Uint32 marshall (Sint32 value)
 
SDL_FORCE_INLINE Uint32 marshall (Uint32 value)
 
SDL_FORCE_INLINE Uint64 marshall (Sint64 value)
 
SDL_FORCE_INLINE Uint64 marshall (Uint64 value)
 
SDL_FORCE_INLINE float marshall (float value)
 
SDL_FORCE_INLINE double marshall (double value)
 
Vec2operator*= (Vec2 &v, const Affine2 &m)
 
const Vec2 operator* (const Vec2 v, const Affine2 &m)
 
const Affine2 operator* (float scalar, const Affine2 &m)
 
const Color4f operator* (float s, const Color4f c)
 
const Color4 operator* (float s, Color4 c)
 
Vec2operator*= (Vec2 &v, const Mat4 &m)
 
const Vec2 operator* (const Vec2 v, const Mat4 &m)
 
Vec3operator*= (Vec3 &v, const Mat4 &m)
 
const Vec3 operator* (const Vec3 v, const Mat4 &m)
 
Vec4operator*= (Vec4 &v, const Mat4 &m)
 
const Vec4 operator* (const Vec4 v, const Mat4 &m)
 
const Mat4 operator* (float scalar, const Mat4 &m)
 
Vec3operator*= (Vec3 &v, const Quaternion &quat)
 
const Vec3 operator* (const Vec3 v, const Quaternion &quat)
 
const Quaternion operator* (float s, const Quaternion &quat)
 
const Vec2 operator* (float x, const Vec2 v)
 
const Vec2 operator/ (float x, const Vec2 v)
 
const Vec3 operator* (float x, const Vec3 v)
 
const Vec3 operator/ (float x, const Vec3 v)
 
const Vec4 operator* (float x, const Vec4 v)
 
const Vec4 operator/ (float x, const Vec4 v)
 
int operator* (Font::Style value)
 
Font::Style operator| (Font::Style lhs, Font::Style rhs)
 
Font::Style operator& (Font::Style lhs, Font::Style rhs)
 
Font::Style operator^ (Font::Style lhs, Font::Style rhs)
 
Font::Style operator~ (Font::Style lhs)
 
std::string gl_error_name (GLenum error)
 
std::string gl_type_name (GLenum error)
 

Detailed Description

The primary CUGL namespace

This namespace is for all classes and functions internal to the CUGL game engine. It does not include external tools like Box 2d or poly2tri.

Typedef Documentation

◆ LoaderCallback

This type represents a callback for asynchronous asset loading

This callback is associated with an asset at the time of the asychronous load request. When the asset either loads, or fails to load, this callback is called with the asset status.

In the case of JSON asset directories, a single callback may be associated with several assets. In that case, the callback funtion is called each time that an asset loads or fails to load. If an entire node in the asset directory fails to load, the callback function will be notified using the key for that JSON node.

The function type is equivalent to

 std::function<void(const std::string& key, bool success)>
Parameters
keyThe key to associate with the asset (or asset category)
successWhether the asset was successfully loaded

◆ Point2

typedef Vec2 cugl::Point2

Provide an alternative name for Vec2

◆ Point3

typedef Vec3 cugl::Point3

Provide an alternative name for Vec3

◆ TouchID

typedef Sint64 cugl::TouchID

This is the type representing a finger or touch

Enumeration Type Documentation

◆ KeyCategory

enum cugl::KeyCategory
strong

! This enum represents the category of the key

Categories are used to group key codes in rough groups

Enumerator
NUMBER 

This key code is a number 0 to 9

LETTER 

This key code is letter in the roman alphabet

ARROW 

This key code is an arrow key

PUNCTUATION 

This key code is a punctuation (or space) marker

SPECIAL 

This key code is a special character, including return or enter

MODIFIER 

This key code is a modier like shift or control

KEYPAD 

This key code is a character from the keypad

UNKNOWN 

This key code is not supported by CUGL

◆ KeyCode

enum cugl::KeyCode : int
strong

This is enum represents a key on a keyboard.

The keys available are subset of the full range of available keys. Because of our goal of cross-platform support, we only support keys that are found on most common keyboards.

The Input dispatcher will convert from an SDL keycode this enum. That means it is possible to receive a KeyCode that is not present in the enum. Any switch statement for this enum should have a default value.

Enumerator
NUM_0 

The 0 key

NUM_1 

The 1 key

NUM_2 

The 2 key

NUM_3 

The 3 key

NUM_4 

The 4 key

NUM_5 

The 5 key

NUM_6 

The 6 key

NUM_7 

The 7 key

NUM_8 

The 8 key

NUM_9 

The 9 key

The A key

The B key

The C key

The D key

The E key

The F key

The G key

The H key

The I key

The J key

The K key

The L key

The M key

The N key

The O key

The P key

The Q key

The R key

The S key

The T key

The U key

The V key

The W key

The X key

The Y key

The Z key

ARROW_DOWN 

The down arrow key

ARROW_LEFT 

The Left arrow key

ARROW_RIGHT 

The right arrow key

ARROW_UP 

The up arrow key

QUOTE 

The ' (apostrophe) key

BACKSLASH 

The \ (backslash) key

COMMA 

The , (comma) key

EQUALS 

The = (equals) key

BACKQUOTE 

The ` (grave accent) key

LEFT_BRACKET 

The [ (left bracket) ley

MINUS 

The - (minus) key

PERIOD 

The . (period) key

RIGHT_BRACKET 

The ] (right bracket) key

SEMICOLON 

The ; (semicolon) key

SLASH 

The / (slash) key

BACKSPACE 

The backspace key

SPACE 

The spacebar

TAB 

The tab key

DEL 

The Delete key

END 

The End key

ESCAPE 

The Esc key

HOME 

The Home key

HELP 

The Help key

PAGE_DOWN 

The PageDown key

PAGE_UP 

The PageUp key

PAUSE 

The Pause/Break key

RETURN 

The Return key

ENTER 

The Enter key

CAPS_LOCK 

The Caps Lock key

LEFT_ALT 

The left Alt/Option key

LEFT_CTRL 

The left Ctrl key

LEFT_SHIFT 

The left Shift key

LEFT_META 

The left Windows/Apple/Meta key

RIGHT_ALT 

The right Alt/Option key

RIGHT_CTRL 

The right Ctrl key

RIGHT_SHIFT 

The right Shift key

RIGHT_META 

The right Windows/Apple/Meta key

NUMLOCK 

The Numlock/Clear key

KEYPAD_0 

Tthe 0 key (numeric keypad)

KEYPAD_1 

The 1 key (numeric keypad)

KEYPAD_2 

The 2 key (numeric keypad)

KEYPAD_3 

The 3 key (numeric keypad)

KEYPAD_4 

The 4 key (numeric keypad)

KEYPAD_5 

The 5 key (numeric keypad)

KEYPAD_6 

The 6 key (numeric keypad)

KEYPAD_7 

The 7 key (numeric keypad)

KEYPAD_8 

The 8 key (numeric keypad)

KEYPAD_9 

The 9 key (numeric keypad)

KEYPAD_CLEAR 

The Clear key (numeric keypad)

KEYPAD_EQUALS 

The = [equals] key (numeric keypad)

KEYPAD_DIVIDE 

The / [divide] key (numeric keypad)

KEYPAD_MULTIPLY 

The * [multiply] key (numeric keypad)

KEYPAD_MINUS 

The - [minus] key (numeric keypad)

KEYPAD_PLUS 

The + [plus] key (numeric keypad)

KEYPAD_ENTER 

The Enter key (numeric keypad)

UNKNOWN 

We have no idea what this key is

Function Documentation

◆ gl_error_name()

std::string cugl::gl_error_name ( GLenum  error)

Returns a string description of an OpenGL error type

Parameters
errorThe OpenGL error type
Returns
a string description of an OpenGL error type

◆ gl_type_name()

std::string cugl::gl_type_name ( GLenum  error)

Returns a string description of an OpenGL data type

Parameters
errorThe OpenGL error type
Returns
a string description of an OpenGL data type

◆ marshall() [1/8]

SDL_FORCE_INLINE double cugl::marshall ( double  value)

Returns the given value encoded in network order

On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.

This function is idempotent. To decode an encoded value, call this function on the value again.

Parameters
valueThe value to encode
Returns
the given value encoded in network order

◆ marshall() [2/8]

SDL_FORCE_INLINE float cugl::marshall ( float  value)

Returns the given value encoded in network order

On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.

This function is idempotent. To decode an encoded value, call this function on the value again.

Parameters
valueThe value to encode
Returns
the given value encoded in network order

◆ marshall() [3/8]

SDL_FORCE_INLINE Uint16 cugl::marshall ( Sint16  value)

Returns the given value encoded in network order

On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.

This function is idempotent. To decode an encoded value, call this function on the value again.

Parameters
valueThe value to encode
Returns
the given value encoded in network order

◆ marshall() [4/8]

SDL_FORCE_INLINE Uint32 cugl::marshall ( Sint32  value)

Returns the given value encoded in network order

On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.

This function is idempotent. To decode an encoded value, call this function on the value again.

Parameters
valueThe value to encode
Returns
the given value encoded in network order

◆ marshall() [5/8]

SDL_FORCE_INLINE Uint64 cugl::marshall ( Sint64  value)

Returns the given value encoded in network order

On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.

This function is idempotent. To decode an encoded value, call this function on the value again.

Parameters
valueThe value to encode
Returns
the given value encoded in network order

◆ marshall() [6/8]

SDL_FORCE_INLINE Uint16 cugl::marshall ( Uint16  value)

Returns the given value encoded in network order

On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.

This function is idempotent. To decode an encoded value, call this function on the value again.

Parameters
valueThe value to encode
Returns
the given value encoded in network order

◆ marshall() [7/8]

SDL_FORCE_INLINE Uint32 cugl::marshall ( Uint32  value)

Returns the given value encoded in network order

On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.

This function is idempotent. To decode an encoded value, call this function on the value again.

Parameters
valueThe value to encode
Returns
the given value encoded in network order

◆ marshall() [8/8]

SDL_FORCE_INLINE Uint64 cugl::marshall ( Uint64  value)

Returns the given value encoded in network order

On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.

This function is idempotent. To decode an encoded value, call this function on the value again.

Parameters
valueThe value to encode
Returns
the given value encoded in network order

◆ operator&()

Font::Style cugl::operator& ( Font::Style  lhs,
Font::Style  rhs 
)
inline

Returns the bitwise and of two font styles.

Returns
the bitwise and of two font styles.

◆ operator*() [1/14]

const Vec2 cugl::operator* ( const Vec2  v,
const Affine2 m 
)
inline

Returns a copy of the vector after it is transformed.

Parameters
vThe point to transform.
mThe transform to apply.
Returns
a copy of the vector after it is transformed.

◆ operator*() [2/14]

const Vec2 cugl::operator* ( const Vec2  v,
const Mat4 m 
)
inline

Returns a copy of the vector transformed by the given matrix.

The vector is treated as a point, which means that translation is applied to the result.

Parameters
vThe point to transform.
mThe matrix to transform by.
Returns
a copy of the vector transformed by the given matrix.

◆ operator*() [3/14]

const Vec3 cugl::operator* ( const Vec3  v,
const Mat4 m 
)
inline

Returns a copy of the vector transformed by the given matrix.

The vector is treated as a point, which means that translation is applied to the result.

Parameters
vThe point to transform.
mThe matrix to transform by.
Returns
a copy of the vector transformed by the given matrix.

◆ operator*() [4/14]

const Vec3 cugl::operator* ( const Vec3  v,
const Quaternion quat 
)
inline

Returns a copy of the vector rotated by the quaternion.

The rotation is defined by the matrix associated with the vector. As per the convention for Mat4, we only allow vectors to be multiplied on the right by quaternions.

Parameters
vThe vector to rotate.
quatThe rotation quaternion.
Returns
a copy of the vector rotated by the quaternion.

◆ operator*() [5/14]

const Vec4 cugl::operator* ( const Vec4  v,
const Mat4 m 
)
inline

Returns a copy of the vector transformed by the given matrix.

The vector is treated as is. Hence whether or not translation is applied depends on the value of w.

Parameters
vThe point to transform.
mThe matrix to transform by.
Returns
a copy of the vector transformed by the given matrix.

◆ operator*() [6/14]

const Color4 cugl::operator* ( float  s,
Color4  c 
)
inline

Returns the scalar product of the given color with the given value.

The scaling is clamped so that this remains a valid color.

This version of scaling always multiplies the alpha values.

Parameters
sThe value to scale by.
cThe color to scale.
Returns
The scaled color.

◆ operator*() [7/14]

const Color4f cugl::operator* ( float  s,
const Color4f  c 
)
inline

Returns the scalar product of the given color with the given value.

The scaling is clamped so that this remains a valid color.

This version of scaling always multiplies the alpha values.

Parameters
sThe value to scale by.
cThe color to scale.
Returns
The scaled color.

◆ operator*() [8/14]

const Quaternion cugl::operator* ( float  s,
const Quaternion quat 
)
inline

Returns the scalar product of the quaternion with the given value.

Parameters
sThe value to scale by.
quatThe quaternion to scale.
Returns
The scalar product of this quaternion with the given value.

◆ operator*() [9/14]

const Affine2 cugl::operator* ( float  scalar,
const Affine2 m 
)
inline

Multiplies the components of the given matrix by the specified scalar.

The scalar is applied to BOTH the core matrix and the offset.

Parameters
scalarThe scalar value.
mThe transform to scale.
Returns
a copy of the scaled transform

◆ operator*() [10/14]

const Mat4 cugl::operator* ( float  scalar,
const Mat4 m 
)
inline

Multiplies the components of the given matrix by the specified scalar.

Parameters
scalarThe scalar value.
mThe matrix to transform by.
Returns
a copy of the scaled matrix

◆ operator*() [11/14]

const Vec2 cugl::operator* ( float  x,
const Vec2  v 
)
inline

Returns the scalar product of the given vector with the given value.

Parameters
xThe value to scale by.
vThe vector to scale.
Returns
The scaled vector.

◆ operator*() [12/14]

const Vec3 cugl::operator* ( float  x,
const Vec3  v 
)
inline

Returns the scalar product of the given vector with the given value.

Parameters
xThe value to scale by.
vThe vector to scale.
Returns
The scaled vector.

◆ operator*() [13/14]

const Vec4 cugl::operator* ( float  x,
const Vec4  v 
)
inline

Returns the scalar product of the given vector with the given value.

Parameters
xThe value to scale by.
vThe vector to scale.
Returns
The scaled vector.

◆ operator*() [14/14]

int cugl::operator* ( Font::Style  value)
inline

Returns the int equivalent of a font style.

Returns
the int equivalent of a font style.

◆ operator*=() [1/5]

Vec2& cugl::operator*= ( Vec2 v,
const Affine2 m 
)
inline

Transforms the given point in place.

Parameters
vThe point to transform.
mThe transform to apply.
Returns
this point, after the transformation occurs.

◆ operator*=() [2/5]

Vec2& cugl::operator*= ( Vec2 v,
const Mat4 m 
)
inline

Transforms the given point by the given matrix.

The vector is treated as a point, which means that translation is applied to the result.

Parameters
vThe point to transform.
mThe matrix to transform by.
Returns
this point, after the transformation occurs.

◆ operator*=() [3/5]

Vec3& cugl::operator*= ( Vec3 v,
const Mat4 m 
)
inline

Transforms the given point by the given matrix.

The vector is treated as a point, which means that translation is applied to the result.

Parameters
vThe point to transform.
mThe matrix to transform by.
Returns
this point, after the transformation occurs.

◆ operator*=() [4/5]

Vec3& cugl::operator*= ( Vec3 v,
const Quaternion quat 
)
inline

Rotates the vector in place by the quaternion.

The rotation is defined by the matrix associated with the vector. As per the convention for Mat4, we only allow vectors to be multiplied on the right by quaternions.

Parameters
vThe vector to rotate.
quatThe rotation quaternion.
Returns
a reference to the vector, after rotation.

◆ operator*=() [5/5]

Vec4& cugl::operator*= ( Vec4 v,
const Mat4 m 
)
inline

Transforms the given point by the given matrix.

The vector is treated as is. Hence whether or not translation is applied depends on the value of w.

Parameters
vThe point to transform.
mThe matrix to transform by.
Returns
this point, after the transformation occurs.

◆ operator/() [1/3]

const Vec2 cugl::operator/ ( float  x,
const Vec2  v 
)
inline

Returns the division of the given value by the vector.

Parameters
xThe value to divide
vThe vector to divide by.
Returns
the division of the given value by the vector.

◆ operator/() [2/3]

const Vec3 cugl::operator/ ( float  x,
const Vec3  v 
)
inline

Returns the division of the given value by the vector.

Parameters
xThe value to divide
vThe vector to divide by.
Returns
the division of the given value by the vector.

◆ operator/() [3/3]

const Vec4 cugl::operator/ ( float  x,
const Vec4  v 
)
inline

Returns the division of the given value by the vector.

Parameters
xThe value to divide
vThe vector to divide by.
Returns
the division of the given value by the vector.

◆ operator^()

Font::Style cugl::operator^ ( Font::Style  lhs,
Font::Style  rhs 
)
inline

Returns the bitwise exclusive or of two font styles.

Returns
the bitwise exclusive or of two font styles.

◆ operator|()

Font::Style cugl::operator| ( Font::Style  lhs,
Font::Style  rhs 
)
inline

Returns the bitwise or of two font styles.

Returns
the bitwise or of two font styles.

◆ operator~()

Font::Style cugl::operator~ ( Font::Style  lhs)
inline

Returns the bitwise complement of a font style.

Returns
the bitwise complement of a font style.