PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFB3DUtil
Wrapper Class for the I3DUtil interface.
#include <SFB3DUtil.h.hpp>
class SFB3DUtil : public SFBQuery;
SFMTYPEDEFWRAPPER(SFB3DUtil)

Inheritance diagram

 Inheritance diagram of SFB3DUtilClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X O X X

Reference

BREW API I3DUtil

Member

Public Functions
SInt32 Cos( SInt32 angle )
Compute the cosine.
SFCError GetRotateMatrix( SInt32 angle , AEE3DTransformMatrix* matrixOut , AEE3DRotateType axis )
Compute the transformation matrix for a rotation about x, y, or z-axis.
SFCError GetRotateVMatrix( AEE3DPoint const * vector , SInt32 angle , AEE3DTransformMatrix* matrixOut )
Compute the transformation matrix for a rotation about a given vector from origin.
SFCError GetUnitVector( AEE3DPoint const * src , AEE3DPoint* dst )
Compute the unit vector (dst) of a source vector (src).
SFCError GetViewTransformMatrix( AEE3DPoint const * position , AEE3DPoint const * look , AEE3DPoint const * up , AEE3DTransformMatrix* matrixOut )
Compute the fixed point transformation matrix for a given position, lookat- direction, and up-direction.
SFCError MatrixMultiply( AEE3DTransformMatrix* matrixOut , AEE3DTransformMatrix const * matrixIn )
This function multiplies two fixed point matrices.
static
SFB3DUtilSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFB3DUtil instance.
static
SFB3DUtilSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFB3DUtil instance.
SFCError SetIdentityMatrix( AEE3DTransformMatrix* matrixOut )
Set the rotation part (3x3) of the transformation matrix to the identity matrix in Q12 format.
SFCError SetTranslationMatrix( AEE3DPoint* vector , AEE3DTransformMatrix* matrix )
Set the translation part of the transformation matrix for a given translation vector in Q12 Fixed Point Format.
SInt32 Sin( SInt32 angle )
Compute the sine.
UInt32 Sqrt( UInt32 number )
Compute the square root of the input parameter number.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFB3DUtil::Cos
Compute the cosine.
[ public ]
SInt32 Cos(
    SInt32 angle   // Q12 format (PI=2048)
);

Reference

BREW API I3DUtil_cos


SFB3DUtil::GetRotateMatrix
Compute the transformation matrix for a rotation about x, y, or z-axis.
[ public ]
SFCError GetRotateMatrix(
    SInt32 angle                      // rotation angle in Q12 format (PI=2048)
    AEE3DTransformMatrix* matrixOut   // pointer to the resulting transformation matrix
    AEE3DRotateType axis              // axis to do rotation around
);

Reference

BREW API I3DUtil_GetRotateMatrix


SFB3DUtil::GetRotateVMatrix
Compute the transformation matrix for a rotation about a given vector from origin.
[ public ]
SFCError GetRotateVMatrix(
    AEE3DPoint const * vector         // pointer to vector originated from origin for the rotation in Q12 format
    SInt32 angle                      // rotation angle in Q12 format (PI=2048)
    AEE3DTransformMatrix* matrixOut   // pointer to the resulting transformation matrix
);

Reference

BREW API I3DUtil_GetRotateVMatrix


SFB3DUtil::GetUnitVector
Compute the unit vector (dst) of a source vector (src).
[ public ]
SFCError GetUnitVector(
    AEE3DPoint const * src   // pointer to source vector
    AEE3DPoint* dst          // pointer to resulting unit vector
);

Description

The resulting vector is Q12.

Rerference

BREW API I3DUtil_GetUnitVector


SFB3DUtil::GetViewTransformMatrix
Compute the fixed point transformation matrix for a given position, lookat- direction, and up-direction.
[ public ]
SFCError GetViewTransformMatrix(
    AEE3DPoint const * position       // pointer to positional vector of the viewer
    AEE3DPoint const * look           // pointer to directional vector of the viewing direction
    AEE3DPoint const * up             // pointer to directional vector for the up-direction
    AEE3DTransformMatrix* matrixOut   // pointer to the resulting transformation matrix
);

Description

Each directional vector is given as a 3D point or vector in Q12 format.

Rerference

BREW API I3DUtil_GetViewTransformMatrix


SFB3DUtil::MatrixMultiply
This function multiplies two fixed point matrices.
[ public ]
SFCError MatrixMultiply(
    AEE3DTransformMatrix* matrixOut         // left multiplicant and the resulting matrix
    AEE3DTransformMatrix const * matrixIn   // right mutiplicant
);

Description

The multiplication is made using the equation: MaxtrixOut = MatrixOut * MatrixIn

Reference

BREW API I3DUtil_MatrixMultiply


SFB3DUtil::NewInstance
Create a new SFB3DUtil instance.
[ public, static ]
SFB3DUtilSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFB3DUtilSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFB3DUtil::SetIdentityMatrix
Set the rotation part (3x3) of the transformation matrix to the identity matrix in Q12 format.
[ public ]
SFCError SetIdentityMatrix(
    AEE3DTransformMatrix* matrixOut   // pointer to the resulting matrix
);

Description

The transformation matrix will set to: { 4096, 0, 0, 0, 0, 4096, 0, 0, 0, 0, 4096, 0 }

Reference

BREW API I3DUtil_SetIdentityMatrix


SFB3DUtil::SetTranslationMatrix
Set the translation part of the transformation matrix for a given translation vector in Q12 Fixed Point Format.
[ public ]
SFCError SetTranslationMatrix(
    AEE3DPoint* vector             // pointer to the translation vector in Q12 Fixed Point Format
    AEE3DTransformMatrix* matrix   // pointer to the resulting matrix
);

Reference

BREW API I3DUtil_SetTranslationMatrix


SFB3DUtil::Sin
Compute the sine.
[ public ]
SInt32 Sin(
    SInt32 angle   // Q12 format (PI=2048)
);

Reference

BREW API I3DUtil_sin


SFB3DUtil::Sqrt
Compute the square root of the input parameter number.
[ public ]
UInt32 Sqrt(
    UInt32 number   // value
);

Reference

BREW API I3DUtil_sqrt