CUGL 2.3
Cornell University Game Library
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions
cugl Namespace Reference

Namespaces

namespace  audio
 
namespace  filetool
 
namespace  physics2
 
namespace  poly2
 
namespace  scene2
 
namespace  strtool
 

Classes

class  AccelerationEvent
 
class  Accelerometer
 
class  Affine2
 
class  Aligned
 
class  Application
 
class  Asset
 
class  AssetManager
 
class  AudioDecoder
 
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  CoreGesture
 
class  CoreGestureEvent
 
class  DelaunayTriangulator
 
class  Display
 
class  EarclipTriangulator
 
class  EasingBezier
 
class  EasingFunction
 
class  Font
 
class  FontLoader
 
class  FreeList
 
class  Frustum
 
class  GenericLoader
 
class  GlyphRun
 
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  PanGesture
 
class  Path2
 
class  PathFactory
 
class  PathSmoother
 
class  PerspectiveCamera
 
class  PinchEvent
 
class  PinchGesture
 
class  Plane
 
class  Poly2
 
class  PolyFactory
 
class  Polynomial
 
class  Quaternion
 
class  Ray
 
class  Rect
 
class  RenderTarget
 
class  Scene2
 
class  Scene2Loader
 
class  Scene2Texture
 
struct  scheduable
 
class  Scissor
 
class  Shader
 
class  SimpleExtruder
 
class  Size
 
class  Sound
 
class  SoundLoader
 
class  SpinEvent
 
class  SpinGesture
 
class  Spline2
 
class  SplinePather
 
class  SpriteBatch
 
class  SpriteSheet
 
class  SpriteVertex2
 
class  SpriteVertex3
 
class  TextEditEvent
 
class  TextInput
 
class  TextInputEvent
 
class  TextLayout
 
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 class  AudioType : int {
  UNKNOWN = -1 , WAV_FILE = 0 , MP3_FILE = 1 , OGG_FILE = 2 ,
  FLAC_FILE = 3 , IN_MEMORY = 4
}
 
enum class  KeyCode : int {
  NUM_0 = SDLK_0 , NUM_1 = SDLK_1 , NUM_2 = SDLK_2 , NUM_3 = SDLK_3 ,
  NUM_4 = SDLK_4 , NUM_5 = SDLK_5 , NUM_6 = SDLK_6 , NUM_7 = SDLK_7 ,
  NUM_8 = SDLK_8 , NUM_9 = SDLK_9 , A = SDLK_a , B = SDLK_b ,
  C = SDLK_c , D = SDLK_d , E = SDLK_e , F = SDLK_f ,
  G = SDLK_g , H = SDLK_h , I = SDLK_i , J = SDLK_j ,
  K = SDLK_k , L = SDLK_l , M = SDLK_m , N = SDLK_n ,
  O = SDLK_o , P = SDLK_p , Q = SDLK_q , R = SDLK_r ,
  S = SDLK_s , T = SDLK_t , U = SDLK_u , V = SDLK_v ,
  W = SDLK_w , X = SDLK_x , Y = SDLK_y , Z = SDLK_z ,
  ARROW_DOWN = SDLK_DOWN , ARROW_LEFT = SDLK_LEFT , ARROW_RIGHT = SDLK_RIGHT , ARROW_UP = SDLK_UP ,
  QUOTE = SDLK_QUOTE , BACKSLASH = SDLK_BACKSLASH , COMMA = SDLK_COMMA , EQUALS = SDLK_EQUALS ,
  BACKQUOTE = SDLK_BACKQUOTE , LEFT_BRACKET = SDLK_LEFTBRACKET , MINUS = SDLK_MINUS , PERIOD = SDLK_PERIOD ,
  RIGHT_BRACKET = SDLK_RIGHTBRACKET , SEMICOLON = SDLK_SEMICOLON , SLASH = SDLK_SLASH , BACKSPACE = SDLK_BACKSPACE ,
  SPACE = SDLK_SPACE , TAB = SDLK_TAB , DEL = SDLK_DELETE , END = SDLK_END ,
  ESCAPE = SDLK_ESCAPE , HOME = SDLK_HOME , HELP = SDLK_HELP , PAGE_DOWN = SDLK_PAGEDOWN ,
  PAGE_UP = SDLK_PAGEUP , PAUSE = SDLK_PAUSE , RETURN = SDLK_RETURN , ENTER = SDLK_RETURN2 ,
  CAPS_LOCK = SDLK_CAPSLOCK , LEFT_ALT = SDLK_LALT , LEFT_CTRL = SDLK_LCTRL , LEFT_SHIFT = SDLK_LSHIFT ,
  LEFT_META = SDLK_LGUI , RIGHT_ALT = SDLK_RALT , RIGHT_CTRL = SDLK_RCTRL , RIGHT_SHIFT = SDLK_RSHIFT ,
  RIGHT_META = SDLK_RGUI , NUMLOCK = SDLK_NUMLOCKCLEAR , KEYPAD_0 = SDLK_KP_0 , KEYPAD_1 = SDLK_KP_1 ,
  KEYPAD_2 = SDLK_KP_2 , KEYPAD_3 = SDLK_KP_3 , KEYPAD_4 = SDLK_KP_4 , KEYPAD_5 = SDLK_KP_5 ,
  KEYPAD_6 = SDLK_KP_6 , KEYPAD_7 = SDLK_KP_7 , KEYPAD_8 = SDLK_KP_8 , KEYPAD_9 = SDLK_KP_9 ,
  KEYPAD_CLEAR = SDLK_KP_CLEAR , KEYPAD_EQUALS = SDLK_KP_EQUALS , KEYPAD_DIVIDE = SDLK_KP_DIVIDE , KEYPAD_MULTIPLY = SDLK_KP_MULTIPLY ,
  KEYPAD_MINUS = SDLK_KP_MINUS , KEYPAD_PLUS = SDLK_KP_PLUS , KEYPAD_ENTER = SDLK_KP_ENTER , UNKNOWN = SDLK_POWER
}
 
enum class  KeyCategory {
  NUMBER , LETTER , ARROW , PUNCTUATION ,
  SPECIAL , MODIFIER , KEYPAD , UNKNOWN
}
 
enum class  CoreGestureType : int { NONE = 0 , PAN = 1 , PINCH = 2 , SPIN = 3 }
 
enum class  StencilEffect : int {
  NATIVE = 0 , NONE = 1 , CLIP = 2 , MASK = 3 ,
  FILL = 4 , WIPE = 5 , STAMP = 6 , CARVE = 7 ,
  CLAMP = 8 , NONE_CLIP = 9 , NONE_MASK = 10 , NONE_FILL = 11 ,
  NONE_WIPE = 12 , NONE_STAMP = 13 , NONE_CARVE = 14 , NONE_CLAMP = 15 ,
  CLIP_JOIN = 16 , CLIP_MEET = 17 , CLIP_NONE = 18 , CLIP_MASK = 19 ,
  CLIP_FILL = 20 , CLIP_WIPE = 21 , CLIP_STAMP = 22 , CLIP_CARVE = 23 ,
  CLIP_CLAMP = 24 , MASK_JOIN = 25 , MASK_MEET = 26 , MASK_NONE = 27 ,
  MASK_CLIP = 28 , MASK_FILL = 29 , MASK_WIPE = 30 , MASK_STAMP = 31 ,
  MASK_CARVE = 32 , MASK_CLAMP = 33 , FILL_JOIN = 34 , FILL_MEET = 35 ,
  FILL_NONE = 36 , FILL_MASK = 37 , FILL_CLIP = 38 , WIPE_NONE = 39 ,
  WIPE_MASK = 40 , WIPE_CLIP = 41 , STAMP_NONE = 42 , STAMP_CLIP = 43 ,
  STAMP_MASK = 44 , STAMP_BOTH = 45 , CARVE_NONE = 46 , CARVE_CLIP = 47 ,
  CARVE_MASK = 48 , CARVE_BOTH = 49 , CLAMP_NONE = 50 , CLAMP_CLIP = 51 ,
  CLAMP_MASK = 52
}
 

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

◆ AudioType

enum class cugl::AudioType : int
strong

This enum represents the currently supported audio sources.

Currenltly, we only support file types that are easy to stream into a Linear PCM format. We recommend that you use OGG for music (which is streamed) and WAV for sound effects (which is buffered).

All audio sources in CUGL interleave the audio channels. MP3 and WAV ADPCM only support mono or stereo. But all other formats can support more channels. SDL supports up to 8 channels (7.1 stereo) in general. Note that the channel layout for OGG data is nonstandard (e.g. channels > 3 are not stereo compatible), so CUGL standardizes the channel layout to agree with FLAC and other data encodings.

Enumerator
UNKNOWN 

An unknown audio file source

WAV_FILE 

A (Windows-style) WAV file

CUGL supports PCM, IEEE Float, and ADPCM encoding (both MS and IMA). However, it does not support MP3 data stored in a WAV file. It also does not support A-law or mu-law.

MP3_FILE 

A simple MP3 file

For licensing reasons, MP3 support is provided by minimp3. The does provide support for VBR MP3 files, but the files must be mono or stereo. CUGL does not support MP3 surround.

OGG_FILE 

An ogg vorbis file

CUGL only supports Vorbis encodings. It does not support FLAC data encoded in an ogg file container. It also does not support the newer Opus codec.

FLAC_FILE 

A FLAC file

CUGL only supports native FLAC encodings. It does not support FLAC data encoded in an ogg file container. In addition, the FLAC data must have a complete stream info header containing the size and channel data.

IN_MEMORY 

An in-memory sound source

These sound sources are linear PCM signals that are generatee programatically, and do not correspond to an audio file.

◆ CoreGestureType

enum class cugl::CoreGestureType : int
strong

This enum represents a core gesture type.

Core gestures are the primary two-finger gestures: pan, spin, and spread. This simple enumeration indicates which gestures have been recognized.

These types are currently exclusive (e.g. you cannot have a pan at the same time as a pinch). This is because the purpose of the core gesture device is to intelligently choose between gestures.

◆ KeyCategory

enum class 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 class 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

◆ StencilEffect

enum class cugl::StencilEffect : int
strong

An enum to support stenciling effects.

A SpriteBatch can support many types of stencil effects. Classic stencil effects including clipping (limiting drawing to a specific region) or masking (prohibiting drawing to a specific region). The stencil effects supported are designed with scene2::CanvasNode in mind as the primary use case.

In particular, stencil effects are designed to support simple constructive area geometry operations. You can union, intersect, or subtract stencil regions to produce the relevant effects. However, this is only used for drawing and does not actually construct the associated geometries.

To support the CAG operations, the sprite batch stencil buffer has two areas: low and high. Operations can be applied to one or both of these regions. All binary operations are operations between these two regions. For example, StencilEffect#CLIP_MASK will restrict all drawing to the stencil region defined in the low buffer, while also prohibiting any drawing to the stencil region in the high buffer. This has the visible effect of "subtracting" the high buffer from the low buffer.

The CAG operations are only supported at the binary level, as we only have two halves of the stencil buffer. However, using non-drawing effects like StencilEffect#CLIP_WIPE or StencilEffect#CLIP_CARVE, it is possible to produce more interesting nested expressions.

Note that when using split-buffer operations, only one of the operations will modify the stencil buffer. That is why there no effects such as FILL_WIPE or CLAMP_STAMP.

Enumerator
NATIVE 

Differs the to the existing OpenGL stencil settings. (DEFAULT)

This effect neither enables nor disables the stencil buffer. Instead it uses the existing OpenGL settings. This is the effect that you should use when you need to manipulate the stencil buffer directly.

NONE 

Disables any stencil effects.

This effect directs a SpriteBatch to ignore the stencil buffer (both halves) when drawing. However, it does not clear the contents of the stencil buffer. To clear the stencil buffer, you will need to call cugl::stencil::clearBuffer.

CLIP 

Restrict all drawing to the unified stencil region.

In order for this effect to do anything, you must have created a stencil region with StencilEffect#STAMP or one of its variants. This effect will process the drawing commands normally, but restrict all drawing to the stencil region. This can be used to quickly draw non-convex shapes by making a stencil and drawing a rectangle over the stencil.

This effect is the same as StencilEffect#CLIP_JOIN in that it respects the union of the two halves of the stencil buffer.

MASK 

Prohibits all drawing to the unified stencil region.

In order for this effect to do anything, you must have created a stencil region with StencilEffect#STAMP or one of its variants. This effect will process the drawing commands normally, but reject any attempts to draw to the stencil region. This can be used to quickly draw shape borders on top of a solid shape.

This effect is the same as StencilEffect#MASK_JOIN in that it respects the union of the two halves of the stencil buffer.

FILL 

Restrict all drawing to the unified stencil region.

In order for this effect to do anything, you must have created a stencil region with StencilEffect#STAMP or one of its variants. This effect will process the drawing commands normally, but restrict all drawing to the stencil region. This can be used to quickly draw non-convex shapes by making a stencil and drawing a rectangle over the stencil.

This effect is different from StencilEffect#CLIP in that it will zero out the pixels it draws in the stencil buffer, effectively removing them from the stencil region. In many applications, this is a fast way to clear the stencil buffer once it is no longer needed.

This effect is the same as StencilEffect#FILL_JOIN in that it respects the union of the two halves of the stencil buffer.

WIPE 

Erases from the unified stencil region.

This effect will not draw anything to the screen. Instead, it will only draw to the stencil buffer directly. Any pixel drawn will be zeroed in the buffer, removing it from the stencil region. The effect StencilEffect#FILL is a combination of this and StencilEffect#CLIP. Again, this is a potential optimization for clearing the stencil buffer. However, on most tiled-based GPUs, it is probably faster to simply clear the whole buffer.

STAMP 

Adds a stencil region the unified buffer

This effect will not have any immediate visible effects. Instead it creates a stencil region for the effects such as StencilEffect#CLIP, StencilEffect#MASK, and the like.

The shapes are drawn to the stencil buffer using a nonzero fill rule. This has the advantage that (unlike an even-odd fill rule) stamps are additive and can be drawn on top of each other. However, it has the disadvantage that it requires both halves of the stencil buffer to store the stamp (which part of the stamp is in which half is undefined).

While this effect implements a nonzero fill rule faithfully, there are technical limitations. The size of the stencil buffer means that more than 256 overlapping polygons of the same orientation will cause unpredictable effects. If this is a problem, use an even odd fill rule instead like StencilEffect#STAMP_NONE (which has no such limitations).

CARVE 

Adds a stencil region the lower buffer

This effect will not have any immediate visible effects. Instead it creates a stencil region for the effects such as StencilEffect#CLIP, StencilEffect#MASK, and the like.

Like StencilEffect#STAMP, shapes are drawn to the stencil buffer instead of the screen. But unlike stamp, this effect is always additive. It ignores path orientation, and does not support holes. This allows the effect to implement a nonzero fill rule while using only half of the buffer. This effect is equivalent to StencilEffect#CARVE_NONE in that it uses only the lower half.

The primary application of this effect is to create stencils from extruded paths so that overlapping sections are not drawn twice (which has negative effects on alpha blending).

CLAMP 

Limits drawing so that each pixel is updated once.

This effect is a variation of StencilEffect#CARVE that also draws as it writes to the stencil buffer. This guarantees that each pixel is updated exactly once. This is used by extruded paths so that overlapping sections are not drawn twice (which has negative effects on alpha blending).

This effect is equivalent to StencilEffect#CLAMP_NONE in that it uses only the lower half.

NONE_CLIP 

Applies StencilEffect#CLIP using the upper stencil buffer only.

As with StencilEffect#CLIP, this effect restricts drawing to the stencil region. However, this effect only uses the stencil region present in the upper stencil buffer.

This effect is designed to be used with stencil regions created by StencilEffect#NONE_STAMP. While it can be used by a stencil region created by StencilEffect#STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable.

NONE_MASK 

Applies StencilEffect#MASK using the upper stencil buffer only.

As with StencilEffect#MASK, this effect prohibits drawing to the stencil region. However, this effect only uses the stencil region present in the upper stencil buffer.

This effect is designed to be used with stencil regions created by StencilEffect#NONE_STAMP. While it can be used by a stencil region created by StencilEffect#STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable.

NONE_FILL 

Applies StencilEffect#FILL using the upper stencil buffer only.

As with StencilEffect#FILL, this effect limits drawing to the stencil region. However, this effect only uses the stencil region present in the upper stencil buffer. It also only zeroes out the upper stencil buffer.

This effect is designed to be used with stencil regions created by StencilEffect#NONE_STAMP. While it can be used by a stencil region created by StencilEffect#STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable.

NONE_WIPE 

Applies StencilEffect#WIPE using the upper stencil buffer only.

As with StencilEffect#WIPE, this effect zeroes out the stencil region, erasing parts of it. However, its effects are limited to the upper stencil region.

This effect is designed to be used with stencil regions created by StencilEffect#NONE_STAMP. While it can be used by a stencil region created by StencilEffect#STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable.

NONE_STAMP 

Adds a stencil region to the upper buffer

This effect will not have any immediate visible effect on the screen screen. Instead, it creates a stencil region for the effects such as StencilEffect#CLIP, StencilEffect#MASK, and the like.

Unlike StencilEffect#STAMP, the region created is limited to the upper half of the stencil buffer. That is because the shapes are drawn to the buffer with an even-odd fill rule (which does not require the full stencil buffer to implement). This has the disadvantage that stamps drawn on top of each other have an "erasing" effect. However, it has the advantage that the this stamp supports a wider array of effects than the simple stamp effect.

Use StencilEffect#NONE_CLAMP if you have an simple stencil with no holes that you wish to write to the upper half of the buffer.

NONE_CARVE 

Adds a stencil region to the upper buffer

This value will not have any immediate visible effect on the screen. Instead, it creates a stencil region for the effects such as StencilEffect#CLIP, StencilEffect#MASK, and the like.

Like StencilEffect#STAMP, shapes are drawn to the stencil buffer instead of the screen. But unlike stamp, this effect is always additive. It ignores path orientation, and does not support holes. This allows the effect to implement a nonzero fill rule while using only the upper half of the buffer.

The primary application of this effect is to create stencils from extruded paths so that overlapping sections are not drawn twice (which has negative effects on alpha blending).

NONE_CLAMP 

Uses the upper buffer to limit each pixel to single update.

This effect is a variation of StencilEffect#NONE_CARVE that also draws as it writes to the upper stencil buffer. This guarantees that each pixel is updated exactly once. This is used by extruded paths so that overlapping sections are not drawn twice (which has negative effects on alpha blending).

CLIP_JOIN 

Restrict all drawing to the unified stencil region.

This effect is the same as StencilEffect#CLIP in that it respects the union of the two halves of the stencil buffer.

CLIP_MEET 

Restrict all drawing to the intersecting stencil region.

This effect is the same as StencilEffect#CLIP, except that it limits drawing to the intersection of the stencil regions in the two halves of the stencil buffer. If a unified stencil region was created by StencilEffect#STAMP, then the results of this effect are unpredictable.

CLIP_NONE 

Applies StencilEffect#CLIP using the lower stencil buffer only.

As with StencilEffect#CLIP, this effect restricts drawing to the stencil region. However, this effect only uses the stencil region present in the lower stencil buffer.

This effect is designed to be used with stencil regions created by StencilEffect#NONE_STAMP. While it can be used by a stencil region created by StencilEffect#STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable.

CLIP_MASK 

Applies a lower buffer StencilEffect#CLIP with an upper StencilEffect#MASK.

This command restricts drawing to the stencil region in the lower buffer while prohibiting any drawing to the stencil region in the upper buffer. If this effect is applied to a unified stencil region created by StencilEffect#STAMP, then the results are unpredictable.

CLIP_FILL 

Applies a lower buffer StencilEffect#CLIP with an upper StencilEffect#FILL.

This command restricts drawing to the stencil region in the unified stencil region of the two buffers. However, it only zeroes pixels in the stencil region of the upper buffer; the lower buffer is untouched. If this effect is applied to a unified stencil region created by StencilEffect#STAMP, then the results are unpredictable.

CLIP_WIPE 

Applies a lower buffer StencilEffect#CLIP with an upper StencilEffect#WIPE.

As with StencilEffect#WIPE, this command does not do any drawing on screen. Instead, it zeroes out the upper stencil buffer. However, it is clipped by the stencil region in the lower buffer, so that it does not zero out any pixel outside this region. Hence this is a way to erase the lower buffer stencil region from the upper buffer stencil region.

CLIP_STAMP 

Applies a lower buffer StencilEffect#CLIP with an upper StencilEffect#STAMP.

As with StencilEffect#NONE_CLAMP, this writes a shape to the upper stencil buffer using an even-odd fill rule. This means that adding a shape on top of existing shape has an erasing effect. However, it also restricts its operation to the stencil region in the lower stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the upper buffer.

CLIP_CARVE 

Applies a lower buffer StencilEffect#CLIP with an upper StencilEffect#CARVE.

As with StencilEffect#NONE_CARVE, this writes an additive shape to the upper stencil buffer. However, it also restricts its operation to the stencil region in the lower stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the upper buffer. Hence this is a way to copy the lower buffer stencil region into the upper buffer.

CLIP_CLAMP 

Applies a lower buffer StencilEffect#CLIP with an upper StencilEffect#CLAMP.

As with StencilEffect#NONE_CLAMP, this draws a nonoverlapping shape using the upper stencil buffer. However, it also restricts its operation to the stencil region in the lower stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the upper buffer.

MASK_JOIN 

Prohibits all drawing to the unified stencil region.

This effect is the same as StencilEffect#MASK in that it respects the union of the two halves of the stencil buffer.

MASK_MEET 

Prohibits all drawing to the intersecting stencil region.

This effect is the same as StencilEffect#MASK, except that it limits drawing to the intersection of the stencil regions in the two halves of the stencil buffer. If a unified stencil region was created by StencilEffect#STAMP, then the results of this effect are unpredictable.

MASK_NONE 

Applies StencilEffect#MASK using the lower stencil buffer only.

As with StencilEffect#MASK, this effect prohibits drawing to the stencil region. However, this effect only uses the stencil region present in the lower stencil buffer.

This effect is designed to be used with stencil regions created by StencilEffect#STAMP_NONE. While it can be used by a stencil region created by StencilEffect#STAMP, the upper stencil buffer is ignored, and hence the results are unpredictable.

MASK_CLIP 

Applies a lower buffer StencilEffect#MASK with an upper StencilEffect#CLIP.

This command restricts drawing to the stencil region in the upper buffer while prohibiting any drawing to the stencil region in the lower buffer. If this effect is applied to a unified stencil region created by StencilEffect#STAMP, then the results are unpredictable.

MASK_FILL 

Applies a lower buffer StencilEffect#MASK with an upper StencilEffect#FILL.

This command restricts drawing to the stencil region in the upper buffer while prohibiting any drawing to the stencil region in the lower buffer. However, it only zeroes the stencil region in the upper buffer; the lower buffer is untouched. In addition, it will only zero those pixels that were drawn.

If this effect is applied to a unified stencil region created by StencilEffect#STAMP, then the results are unpredictable.

MASK_WIPE 

Applies a lower buffer StencilEffect#MASK with an upper StencilEffect#WIPE.

As with StencilEffect#WIPE, this command does not do any drawing on screen. Instead, it zeroes out the upper stencil buffer. However, it is masked by the stencil region in the lower buffer, so that it does not zero out any pixel inside this region.

MASK_STAMP 

Applies a lower buffer StencilEffect#MASK with an upper StencilEffect#STAMP.

As with StencilEffect#NONE_STAMP, this writes a shape to the upper stencil buffer using an even-odd fill rule. This means that adding a shape on top of existing shape has an erasing effect. However, it also masks its operation by the stencil region in the lower stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the upper buffer.

MASK_CARVE 

Applies a lower buffer StencilEffect#MASK with an upper StencilEffect#CARVE.

As with StencilEffect#NONE_CARVE, this writes an additive shape to the upper stencil buffer. However, it also prohibits any drawing to the stencil region in the lower stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the upper buffer.

MASK_CLAMP 

Applies a lower buffer StencilEffect#MASK with an upper StencilEffect#CLAMP.

As with StencilEffect#NONE_CLAMP, this draws a nonoverlapping shape using the upper stencil buffer. However, it also prohibits any drawing to the stencil region in the lower stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the upper buffer.

FILL_JOIN 

Restrict all drawing to the unified stencil region.

This effect is the same as StencilEffect#FILL in that it respects the union of the two halves of the stencil buffer.

FILL_MEET 

Restrict all drawing to the intersecting stencil region.

This effect is the same as StencilEffect#FILL, except that it limits drawing to the intersection of the stencil regions in the two halves of the stencil buffer.

When zeroing out pixels, this operation zeroes out both halves of the stencil buffer. If a unified stencil region was created by StencilEffect#STAMP, the results of this effect are unpredictable.

FILL_NONE 

Applies StencilEffect#FILL using the lower stencil buffer only.

As with StencilEffect#FILL, this effect restricts drawing to the stencil region. However, this effect only uses the stencil region present in the lower stencil buffer. It also only zeroes the stencil region in this lower buffer.

This effect is designed to be used with stencil regions created by StencilEffect#NONE_STAMP. While it can be used by a stencil region created by StencilEffect#STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable.

FILL_MASK 

Applies a lower buffer StencilEffect#FILL with an upper StencilEffect#MASK.

This command restricts drawing to the stencil region in the lower buffer while prohibiting any drawing to the stencil region in the upper buffer.

When zeroing out the stencil region, this part of the effect is only applied to the lower buffer. If this effect is applied to a unified stencil region created by StencilEffect#STAMP, then the results are unpredictable.

FILL_CLIP 

Applies a lower buffer StencilEffect#FILL with an upper StencilEffect#CLIP.

This command restricts drawing to the stencil region in the unified stencil region of the two buffers. However, it only zeroes pixels in the stencil region of the lower buffer; the lower buffer is untouched. If this effect is applied to a unified stencil region created by StencilEffect#STAMP, then the results are unpredictable.

WIPE_NONE 

Applies StencilEffect#WIPE using the lower stencil buffer only.

As with StencilEffect#WIPE, this effect zeroes out the stencil region, erasing parts of it. However, its effects are limited to the lower stencil region.

This effect is designed to be used with stencil regions created by StencilEffect#NONE_STAMP. While it can be used by a stencil region created by StencilEffect#STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable.

WIPE_MASK 

Applies a lower buffer StencilEffect#WIPE with an upper StencilEffect#MASK.

This command erases from the stencil region in the lower buffer. However, it limits its erasing to locations that are not masked by the stencil region in the upper buffer. If this effect is applied to a unified stencil region created by StencilEffect#STAMP, the results are unpredictable.

WIPE_CLIP 

Applies a lower buffer StencilEffect#WIPE with an upper StencilEffect#CLIP.

This command erases from the stencil region in the lower buffer. However, it limits its erasing to locations that are contained in the stencil region in the upper buffer. If this effect is applied to a unified stencil region created by StencilEffect#STAMP, the results are unpredictable.

STAMP_NONE 

Adds a stencil region to the lower buffer

This effect will not have any immediate visible effect on the screen screen. Instead, it creates a stencil region for the effects such as StencilEffect#CLIP, StencilEffect#MASK, and the like.

Unlike StencilEffect#STAMP, the region created is limited to the lower half of the stencil buffer. That is because the shapes are drawn to the buffer with an even-odd fill rule (which does not require the full stencil buffer to implement). This has the disadvantage that stamps drawn on top of each other have an "erasing" effect. However, it has the advantage that the this stamp supports a wider array of effects than the simple stamp effect.

STAMP_CLIP 

Applies a lower buffer StencilEffect#STAMP with an upper StencilEffect#CLIP.

As with StencilEffect#STAMP_NONE, this writes a shape to the lower stencil buffer using an even-odd fill rule. This means that adding a shape on top of existing shape has an erasing effect. However, it also restricts its operation to the stencil region in the upper stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the lower buffer.

STAMP_MASK 

Applies a lower buffer StencilEffect#STAMP with an upper StencilEffect#MASK.

As with StencilEffect#STAMP_NONE, this writes a shape to the lower stencil buffer using an even-odd fill rule. This means that adding a shape on top of existing shape has an erasing effect. However, it also masks its operation by the stencil region in the upper stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the lower buffer.

STAMP_BOTH 

Adds a stencil region to both the lower and the upper buffer

This effect will not have any immediate visible effect on the screen screen. Instead, it creates a stencil region for the effects such as StencilEffect#CLIP, StencilEffect#MASK, and the like.

Unlike StencilEffect#STAMP, the region is create twice and put in both the upper and the lower stencil buffer. That is because the shapes are drawn to the buffer with an even-odd fill rule (which does not require the full stencil buffer to implement). This has the disadvantage that stamps drawn on top of each other have an "erasing" effect. However, it has the advantage that the this stamp supports a wider array of effects than the simple stamp effect.

The use of both buffers to provide a greater degree of flexibility.

CARVE_NONE 

Adds a stencil region to the lower buffer

This effect is equivalent to StencilEffect#CARVE, since it only uses half of the stencil buffer.

CARVE_CLIP 

Applies a lower buffer StencilEffect#CARVE with an upper StencilEffect#CLIP.

As with StencilEffect#CARVE_NONE, this writes an additive shape to the lower stencil buffer. However, it also restricts its operation to the stencil region in the upper stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the lower buffer. Hence this is a way to copy the upper buffer stencil region into the lower buffer.

CARVE_MASK 

Applies a lower buffer StencilEffect#CARVE with an upper StencilEffect#MASK.

As with StencilEffect#CARVE_NONE, this writes an additive shape to the lower stencil buffer. However, it also prohibits any drawing to the stencil region in the upper stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the lower buffer.

CARVE_BOTH 

Adds a stencil region to both the lower and upper buffer

This effect is similar to StencilEffect#CARVE, except that it uses both buffers. This is to give a wider degree of flexibility.

CLAMP_NONE 

Uses the lower buffer to limit each pixel to single update.

This effect is equivalent to StencilEffect#CLAMP, since it only uses half of the stencil buffer.

CLAMP_CLIP 

Applies a lower buffer StencilEffect#CLAMP with an upper StencilEffect#CLIP.

As with StencilEffect#CLAMP_NONE, this draws a nonoverlapping shape using the lower stencil buffer. However, it also restricts its operation to the stencil region in the upper stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the lower buffer.

CLAMP_MASK 

Applies a lower buffer StencilEffect#CLAMP with an upper StencilEffect#MASK.

As with StencilEffect#CLAMP_NONE, this draws a nonoverlapping shape using the lower stencil buffer. However, it also prohibits any drawing to the stencil region in the upper stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the lower buffer.

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.