Public Member Functions | Public Attributes

ScaleValue Class Reference

This reference page is linked to from the following overview topics: Lesson 4: Animation Controllers, Object Offset Transformation, Controllers, Keyframe Data Access Classes and Methods.


Search for all occurrences

Detailed Description

See also:
Class Point3, Class Quat.

Description:
A ScaleValue describes an arbitrary non-uniform scaling in an arbitrary axis system. The Point3 s gives the scaling along the x, y, and z axes, and the quaternion q defines the axis system in which scaling is to be applied. All methods are implemented by the system.
Data Members:
Point3 s;

Scale components.

Quat q;

The axis system of application.

#include <control.h>

Inheritance diagram for ScaleValue:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  ScaleValue ()
  ScaleValue (const Point3 &as)
  ScaleValue (const Point3 &as, const Quat &aq)
ScaleValue operator+= (const ScaleValue &s)
ScaleValue operator*= (const float s)
ScaleValue operator= (const ScaleValue &v)
float &  operator[] (int el)

Public Attributes

Point3  s
Quat  q

Constructor & Destructor Documentation

ScaleValue ( ) [inline]
Remarks:
Constructor. No initialization is performed.
{ /* NO INIT! */ }
ScaleValue ( const Point3 as ) [inline]
Remarks:
Constructor. The scale data member is initialized to as. The quaternion data member is set to the identity.
{ s = as; q = IdentQuat(); }
ScaleValue ( const Point3 as,
const Quat aq 
) [inline]
Remarks:
Constructor. The scale data member is initialized to as. The quaternion data member is set to aq.
Operators:
{s = as; q = aq; }

Member Function Documentation

ScaleValue& operator+= ( const ScaleValue s ) [inline]
Remarks:
Adds a ScaleValue to this ScaleValue.
      { (*this)=(*this)+s; return (*this);}
ScaleValue& operator*= ( const float  s ) [inline]
Remarks:
Multiplies this ScaleValue by a float. This updates the scale components.
      { (*this)=(*this)*s; return (*this);}
ScaleValue& operator= ( const ScaleValue v ) [inline]
{s=v.s;q=v.q; return (*this);}
float& operator[] ( int  el ) [inline]
Remarks:
Array access operator. This allows the scale components to be accessed using the array operator.
Parameters:
int el

Specifies the element to access: 0=x, 1=y, 2=z.

{return s[el];}

Member Data Documentation


ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue
ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue ScaleValue