CUGL 2.0
Cornell University Game Library
|
Namespaces | |
audio | |
filetool | |
physics2 | |
poly2 | |
scene2 | |
strtool | |
Typedefs | |
typedef std::function< void(const std::string &key, bool success)> | LoaderCallback |
typedef Sint64 | TouchID |
typedef Vec2 | Point2 |
typedef Vec3 | Point3 |
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) |
Vec2 & | operator*= (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) |
Vec2 & | operator*= (Vec2 &v, const Mat4 &m) |
const Vec2 | operator* (const Vec2 v, const Mat4 &m) |
Vec3 & | operator*= (Vec3 &v, const Mat4 &m) |
const Vec3 | operator* (const Vec3 v, const Mat4 &m) |
Vec4 & | operator*= (Vec4 &v, const Mat4 &m) |
const Vec4 | operator* (const Vec4 v, const Mat4 &m) |
const Mat4 | operator* (float scalar, const Mat4 &m) |
Vec3 & | operator*= (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) |
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.
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)>
key | The key to associate with the asset (or asset category) |
success | Whether the asset was successfully loaded |
typedef Vec2 cugl::Point2 |
Provide an alternative name for Vec2
typedef Vec3 cugl::Point3 |
Provide an alternative name for Vec3
typedef Sint64 cugl::TouchID |
This is the type representing a finger or touch
|
strong |
! This enum represents the category of the key
Categories are used to group key codes in rough groups
|
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.
std::string cugl::gl_error_name | ( | GLenum | error | ) |
Returns a string description of an OpenGL error type
error | The OpenGL error type |
std::string cugl::gl_type_name | ( | GLenum | error | ) |
Returns a string description of an OpenGL data type
error | The OpenGL error type |
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.
value | The value to encode |
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.
value | The value to encode |
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.
value | The value to encode |
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.
value | The value to encode |
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.
value | The value to encode |
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.
value | The value to encode |
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.
value | The value to encode |
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.
value | The value to encode |
|
inline |
Returns the bitwise and of two font styles.
Returns a copy of the vector after it is transformed.
v | The point to transform. |
m | The transform to apply. |
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.
v | The point to transform. |
m | The matrix to transform by. |
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.
v | The point to transform. |
m | The matrix to transform by. |
|
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.
v | The vector to rotate. |
quat | The rotation quaternion. |
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.
v | The point to transform. |
m | The matrix to transform by. |
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.
s | The value to scale by. |
c | The color to scale. |
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.
s | The value to scale by. |
c | The color to scale. |
|
inline |
Returns the scalar product of the quaternion with the given value.
s | The value to scale by. |
quat | The quaternion to scale. |
Multiplies the components of the given matrix by the specified scalar.
The scalar is applied to BOTH the core matrix and the offset.
scalar | The scalar value. |
m | The transform to scale. |
Multiplies the components of the given matrix by the specified scalar.
scalar | The scalar value. |
m | The matrix to transform by. |
Returns the scalar product of the given vector with the given value.
x | The value to scale by. |
v | The vector to scale. |
Returns the scalar product of the given vector with the given value.
x | The value to scale by. |
v | The vector to scale. |
Returns the scalar product of the given vector with the given value.
x | The value to scale by. |
v | The vector to scale. |
|
inline |
Returns the int equivalent of a font style.
Transforms the given point in place.
v | The point to transform. |
m | The transform to apply. |
Transforms the given point by the given matrix.
The vector is treated as a point, which means that translation is applied to the result.
v | The point to transform. |
m | The matrix to transform by. |
Transforms the given point by the given matrix.
The vector is treated as a point, which means that translation is applied to the result.
v | The point to transform. |
m | The matrix to transform by. |
|
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.
v | The vector to rotate. |
quat | The rotation quaternion. |
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.
v | The point to transform. |
m | The matrix to transform by. |
Returns the division of the given value by the vector.
x | The value to divide |
v | The vector to divide by. |
Returns the division of the given value by the vector.
x | The value to divide |
v | The vector to divide by. |
Returns the division of the given value by the vector.
x | The value to divide |
v | The vector to divide by. |
|
inline |
Returns the bitwise exclusive or of two font styles.
|
inline |
Returns the bitwise or of two font styles.
|
inline |
Returns the bitwise complement of a font style.