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

Inheritance diagram

 Inheritance diagram of SFB3DClass

Version

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

Reference

BREW API I3D

Member

Public Functions
SFCError ApplyModelViewTransform( AEE3DTLVertex* vertex , AEE3DPoint* vertexBuf , UInt32 numVertices )
Appointment of a series of acme coordinate vector,and the number of coordinate. Extensive class for modle view convertion.
SFCError CalcVertexArrayColor( AEE3DTLVertex* vertexArray , UInt16Ptr vertexIndexArray , UInt32 numVertices , AEE3DPoint16* vertexNormal , AEE3DPrimitiveType primType )
Calculate the color value in AEETLVertex array (RGB).
SFCError CalcVertexArrayNormal( AEE3DPoint16* vertexNormal , UInt16Ptr vertexIndexArray , UInt32 numTriangles , AEE3DPoint* vertexArray , AEE3DPrimitiveType primType )
Calculates the normal components (nx, ny, nz) in the vertex normal array.
SFCError GetClipRect( SFXRectanglePtr rect )
Gets the clipping rectangle. All output parameters will be in terms of number of pixels.
SFCError GetCoordTransformMode( AEE3DCoordinateTransformType* type )
Get the coordinate transformation type from the graphics context. This will indicate which coordinate transformation will be applied before triangles are rendered.
SFCError GetCullingMode( AEE3DCullingType* facing )
Get the culling type.
SFCError GetDestination( SFBBitmapSmpPtr destBmp )
Get the Frame Buffer from the SFBBitmap interface.
SFBBitmapSmp GetDestination( Void )
Get the Frame Buffer from the SFBBitmap interface.
SFCError GetFocalLength( UInt16Ptr focalLength )
Get the focal length.
SFCError GetLight( AEE3DLightType type , AEE3DLight* light )
Get the lighting properties for the specified light type.
SFCError GetLightingMode( AEE3DLightingMode* mode )
Get the lighting mode values. This mode will indicate what lighting is enabled for rendering.
SFCError GetMaterial( AEE3DMaterial* material )
Get the current material.
SFCError GetModelViewTransform( AEE3DTransformMatrix* matrix )
Get the fixed point transformation matrix.
SFCError GetRenderMode( AEE3DRenderType* type )
Get the rendering type. It indicates how the triangle will be filled based on the surface color, texel, and shading mode.
SFCError GetScreenMapping( SInt32Ptr sx , SInt32Ptr sy , SInt32Ptr shftx , SInt32Ptr shfty )
Get the fixed-point screen mapping.
SFCError GetTexture( AEE3DTexture* texture )
Get the texture of a specific type that is used in 3D rendering.
SFCError GetViewDepth( UInt16Ptr nearView , UInt16Ptr farView )
Get the view depth in graphics context.
static
SFB3DSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFB3D instance.
static
SFB3DSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFB3D instance.
SFCError PopMatrix( Void )
Pop the current matrix off the stack.
SFCError PushMatrix( Void )
Push the current matrix onto the stack.
SFCError RegisterEventNotify( PFN3DEVENTNOTIFY notify , VoidPtr data )
Register an event callback function to be invoked whenever there is some new event or information to report about an asynchronous SFB3D operation.
SFCError RenderTriangleFan( AEE3DTLVertex* vertexArray , UInt16ConstPtr vertexIndexArray , UInt32 numOfTriangles , UInt32 numOfVertices )
Render a triangle fan where each additional vertex defines a new triangle after the initial two vertices are defined. The first vertex is part of every triangle.
SFCError RenderTriangleStrip( AEE3DTLVertex* vertexArray , UInt16ConstPtr vertexIndexArray , UInt32 numOfTriangles , UInt32 numOfVertices )
Renders a triangle strip, where each additional vertex defines a new triangle after the initial two vertices are defined.
SFCError RenderTriangles( AEE3DTLVertex* vertexArray , UInt16ConstPtr vertexIndexArray , UInt32 numOfTriangles , UInt32 numOfVertices )
Render one or more triangles.
Void ResetZBuf( Void )
Reset the Z buffer to the highest depth value (65535 for 16-bit z-buffer).
SFCError SetClipRect( SFXRectangleRef rect )
Set the clipping rectangle.
SFCError SetCoordTransformMode( AEE3DCoordinateTransformType type )
Set the coordinate transformation type.
SFCError SetCullingMode( AEE3DCullingType facing )
Set the FRONT or BACK face culling.
SFCError SetDestination( SFBBitmapSmpConstRef frameBuffer )
Set the Frame Buffer.
SFCError SetFocalLength( UInt16 length )
Set the focal length. The input range should be within (1 to 32767). Perspective division is not performed when focal length=0.
SFCError SetLight( AEE3DLight* light )
Set the lighting properties for the specified light type.
SFCError SetLightingMode( AEE3DLightingMode mode )
Set the lighting mode. This mode will indicate what lighting is enabled for rendering.
SFCError SetMaterial( AEE3DMaterial* material )
Set the current material properties.
SFCError SetModelViewTransform( AEE3DTransformMatrix* matrix )
The input matrix is assumed to have the correct Q-factor.
SFCError SetRenderMode( AEE3DRenderType type )
Set the rendering type.
SFCError SetScreenMapping( SInt32 sx , SInt32 sy , SInt32 shftx , SInt32 shfty )
Set the fixed-point screen mapping matrix.
SFCError SetTexture( AEE3DTexture* texture )
Set texture to be used in 3D rendering.
SFCError SetViewDepth( UInt16 nearView , UInt16 farView )
Set view depth to be used in graphics context. Objects outside the view depth will not be rendered.
SFCError StartFrame( Void )
This function will not block but will run asynchronously. It will tell the 3D graphics engine to start processing and rendering the current frame.
SFCError UnregisterEventNotify( Void )
Unregister the event callback function.
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.

SFB3D::ApplyModelViewTransform
Appointment of a series of acme coordinate vector,and the number of coordinate. Extensive class for modle view convertion.
[ public ]
SFCError ApplyModelViewTransform(
    AEE3DTLVertex* vertex   // vertex object for 3D rendering
    AEE3DPoint* vertexBuf   // pointers to a series of acme coordinate vector( x , y , z )
    UInt32 numVertices      // the number of coordinate
);

Reference

BREW API I3D_ApplyModelViewTransform


SFB3D::CalcVertexArrayColor
Calculate the color value in AEETLVertex array (RGB).
[ public ]
SFCError CalcVertexArrayColor(
    AEE3DTLVertex* vertexArray    // pointer to the list of AEETLVertex
    UInt16Ptr vertexIndexArray    // index list of vertex 
    UInt32 numVertices            // number of vertices
    AEE3DPoint16* vertexNormal    // list of vertex normal
    AEE3DPrimitiveType primType   // type of the primitive refer to pVertexList (triangle, sector etc.)
);

Reference

BREW API I3D_CalcVertexArrayColor


SFB3D::CalcVertexArrayNormal
Calculates the normal components (nx, ny, nz) in the vertex normal array.
[ public ]
SFCError CalcVertexArrayNormal(
    AEE3DPoint16* vertexNormal    // pointer to vertex normal array
    UInt16Ptr vertexIndexArray    // pointer to the index vertex array
    UInt32 numTriangles           // number of triangles
    AEE3DPoint* vertexArray       // pointer to array of vertices
    AEE3DPrimitiveType primType   // type of primitive to which the Vertex Index Array is referring. (triangles, triangle fan, and so on)
);

Reference

BREW API I3D_CalcVertexArrayNormal


SFB3D::GetClipRect
Gets the clipping rectangle. All output parameters will be in terms of number of pixels.
[ public ]
SFCError GetClipRect(
    SFXRectanglePtr rect   // clipping rectangle
);

Reference

BREW API I3D_GetClipRect


SFB3D::GetCoordTransformMode
Get the coordinate transformation type from the graphics context. This will indicate which coordinate transformation will be applied before triangles are rendered.
[ public ]
SFCError GetCoordTransformMode(
    AEE3DCoordinateTransformType* type   // pointer to a Coordinate Transformation type
);

Version

This function is currently not supported.

Reference

BREW API I3D_GetCoordTransformMode


SFB3D::GetCullingMode
Get the culling type.
[ public ]
SFCError GetCullingMode(
    AEE3DCullingType* facing   // pointer to culling type
);

Description

This will indicate which triangles should be discarded before they are mapped to the screen. By default, triangles with vertices arranged in counterclockwise rotation will be visible. A counterclockwise orientation indicates front-facing; aclockwise orientation is considered back-facing.

Reference

BREW API I3D_GetCullingMode


SFB3D::GetDestination
Get the Frame Buffer from the SFBBitmap interface.
[ public ]
SFCError GetDestination(
    SFBBitmapSmpPtr destBmp   // SFBBitmap interface for 3D graphics frame buffer
);
[ public ]
SFBBitmapSmp GetDestination(Void);

Reference

BREW API I3D_GetDestination


SFB3D::GetFocalLength
Get the focal length.
[ public ]
SFCError GetFocalLength(
    UInt16Ptr focalLength   // pointer to a Focal Length
);

Reference

BREW API I3D_GetFocalLength


SFB3D::GetLight
Get the lighting properties for the specified light type.
[ public ]
SFCError GetLight(
    AEE3DLightType type   // light type
    AEE3DLight* light     // pointer to the material
);

Reference

BREW API I3D_GetLight


SFB3D::GetLightingMode
Get the lighting mode values. This mode will indicate what lighting is enabled for rendering.
[ public ]
SFCError GetLightingMode(
    AEE3DLightingMode* mode   // pointer to current lighting mode
);

Reference

BREW API I3D_GetLightingMode


SFB3D::GetMaterial
Get the current material.
[ public ]
SFCError GetMaterial(
    AEE3DMaterial* material   // pointer to the material
);

Reference

BREW API I3D_GetMaterial


SFB3D::GetModelViewTransform
Get the fixed point transformation matrix.
[ public ]
SFCError GetModelViewTransform(
    AEE3DTransformMatrix* matrix   // pointer to a transformation matrix
);

Description

Get the fixed point transformation matrix. It is copied from the ModelViewTransform member of the graphics context structure.

Reference

BREW API I3D_GetModelViewTransform


SFB3D::GetRenderMode
Get the rendering type. It indicates how the triangle will be filled based on the surface color, texel, and shading mode.
[ public ]
SFCError GetRenderMode(
    AEE3DRenderType* type   // pointer to a Render type
);

Reference

BREW API I3D_GetRenderMode


SFB3D::GetScreenMapping
Get the fixed-point screen mapping.
[ public ]
SFCError GetScreenMapping(
    SInt32Ptr sx      // pointer that will contain the X-scaling in Q12 format
    SInt32Ptr sy      // pointer that will contain the Y-scaling in Q12 format
    SInt32Ptr shftx   // pointer that will contain the X-shift in number of pixels
    SInt32Ptr shfty   // pointer that will contain the Y-shift in number of pixels
);

Description

Get the fixed-point screen mapping. The scaling part of the output is in Q12 format. The translation or shift part is in pixel units.

Reference

BREW API I3D_GetScreenMapping


SFB3D::GetTexture
Get the texture of a specific type that is used in 3D rendering.
[ public ]
SFCError GetTexture(
    AEE3DTexture* texture   // pointer that contains the texture from the graphics context
);

Referance

BREW API I3D_GetTexture


SFB3D::GetViewDepth
Get the view depth in graphics context.
[ public ]
SFCError GetViewDepth(
    UInt16Ptr nearView   // pointer will contain value of the near view plane (1 <= z0 <= z1) 
    UInt16Ptr farView    // pointer will contain value of the far view plane (z0 <= z1 <= 32767) 
);

Description

Get the view depth in graphics context. Objects outside the view depth will not be rendered.

Reference

BREW API I3D_GetViewDepth


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

SFB3D::PopMatrix
Pop the current matrix off the stack.
[ public ]
SFCError PopMatrix(Void);

Reference

BREW API I3D_PopMatrix


SFB3D::PushMatrix
Push the current matrix onto the stack.
[ public ]
SFCError PushMatrix(Void);

Reference

BREW API I3D_PushMatrix


SFB3D::RegisterEventNotify
Register an event callback function to be invoked whenever there is some new event or information to report about an asynchronous SFB3D operation.
[ public ]
SFCError RegisterEventNotify(
    PFN3DEVENTNOTIFY notify   // pointer to the callback function to invoke to notify the application of events (null to deregister)
    VoidPtr data              // user data to be passed to callback when it is invoked
);

Description

Register an event callback function to be invoked whenever there is some new event or information to report about an asynchronous SFB3D operation. The application will not block on 3D rendering functions. The application developer needs to register a callback function to be notified when it is okay to start the next frame and to update the display. See the 3D events section to understand what each event means.

Reference

BREW API I3D_RegisterEventNotify


SFB3D::RenderTriangleFan
Render a triangle fan where each additional vertex defines a new triangle after the initial two vertices are defined. The first vertex is part of every triangle.
[ public ]
SFCError RenderTriangleFan(
    AEE3DTLVertex* vertexArray        // list of vertices
    UInt16ConstPtr vertexIndexArray   // index list to the vertex list
    UInt32 numOfTriangles             // number of triangles
    UInt32 numOfVertices              // number of vertices
);

Reference

BREW API I3D_RenderTriangleFan


SFB3D::RenderTriangleStrip
Renders a triangle strip, where each additional vertex defines a new triangle after the initial two vertices are defined.
[ public ]
SFCError RenderTriangleStrip(
    AEE3DTLVertex* vertexArray        // list of vertices
    UInt16ConstPtr vertexIndexArray   // list of indices into the vertex list; 
                                      // every three in sequence define a triangle
    UInt32 numOfTriangles             // number of triangles
    UInt32 numOfVertices              // number of vertices
);

Reference

BREW API I3D_RenderTriangleStrip


SFB3D::RenderTriangles
Render one or more triangles.
[ public ]
SFCError RenderTriangles(
    AEE3DTLVertex* vertexArray        // list of vertices
    UInt16ConstPtr vertexIndexArray   // list of indicies into the vertex list; every three in sequence define a triangle
    UInt32 numOfTriangles             // number of triangles
    UInt32 numOfVertices              // number of vertices
);

Reference

BREW API I3D_RenderTriangles


SFB3D::ResetZBuf
Reset the Z buffer to the highest depth value (65535 for 16-bit z-buffer).
[ public ]
Void ResetZBuf(Void);

Reference

BREW API I3D_ResetZBuf


SFB3D::SetClipRect
Set the clipping rectangle.
[ public ]
SFCError SetClipRect(
    SFXRectangleRef rect   // pointer to a Clipping Rectangle
);

Description

Set the clipping rectangle. All input parameters are in pixel units. Objects outside the clipping rectangle will not be rendered. The clipping rectangle is the full display area by default.

Reference

BREW API I3D_SetClipRect


SFB3D::SetCoordTransformMode
Set the coordinate transformation type.
[ public ]
SFCError SetCoordTransformMode(
    AEE3DCoordinateTransformType type   // coordinate Transformation type
);

Description

Set the coordinate transformation type. This will indicate which coordinate transformation will be applied before triangles are rendered. Model view transformation, projection, and screen mapping will all be applied by default.

Version

This function is currently not supported.

Reference

BREW API I3D_SetCoordTransformMode


SFB3D::SetCullingMode
Set the FRONT or BACK face culling.
[ public ]
SFCError SetCullingMode(
    AEE3DCullingType facing   // either FRONT-or BACK-facing polygons will be culled
);

Description

Set the FRONT or BACK face culling. This will indicate which triangles should be discarded before they are rendered. By default, triangles with vertices arranged in counter-clockwise rotation will be visible. A counter-clockwise rotation indicates front-facing; a clock-wise rotation is considered back-facing.

Reference

BREW API I3D_SetCullingMode


SFB3D::SetDestination
Set the Frame Buffer.
[ public ]
SFCError SetDestination(
    SFBBitmapSmpConstRef frameBuffer   // SFBBitmap interface for 3D graphics frame buffer
);

Reference

BREW API I3D_SetDestination


SFB3D::SetFocalLength
Set the focal length. The input range should be within (1 to 32767). Perspective division is not performed when focal length=0.
[ public ]
SFCError SetFocalLength(
    UInt16 length   // focal length (1 <= f <= 32767)
);

Description

Set the focal length. The input range should be within the Z buffer(1 to 32767). Perspective division is not performed when focal length=0.

Reference

BREW API I3D_SetFocalLength


SFB3D::SetLight
Set the lighting properties for the specified light type.
[ public ]
SFCError SetLight(
    AEE3DLight* light   // the value of a light to be set
);

Reference

BREW API I3D_SetLight


SFB3D::SetLightingMode
Set the lighting mode. This mode will indicate what lighting is enabled for rendering.
[ public ]
SFCError SetLightingMode(
    AEE3DLightingMode mode   // the lighting mode
);

Interface

BREW API I3D_SetLightingMode


SFB3D::SetMaterial
Set the current material properties.
[ public ]
SFCError SetMaterial(
    AEE3DMaterial* material   // pointer to the material
);

Reference

BREW API I3D_SetMaterial


SFB3D::SetModelViewTransform
The input matrix is assumed to have the correct Q-factor.
[ public ]
SFCError SetModelViewTransform(
    AEE3DTransformMatrix* matrix   // pointer to a Model-view transformation matrix
);

Description

The input matrix is assumed to have the correct Q-factor. It is copied to the Model View Transform Matrix of the graphics context structure. The range of input is not checked.

Reference

BREW API I3D_SetModelViewTransform


SFB3D::SetRenderMode
Set the rendering type.
[ public ]
SFCError SetRenderMode(
    AEE3DRenderType type   // render type
);

Description

Set the rendering type. It determines how the triangle will be filled based on the surface color, texel, and shading mode. A triangle will be shaded with a single color (flat shading) by default.

Reference

BREW API I3D_SetRenderMode


SFB3D::SetScreenMapping
Set the fixed-point screen mapping matrix.
[ public ]
SFCError SetScreenMapping(
    SInt32 sx      // x-scaling in Q12 format (unit scaling = 4096)
    SInt32 sy      // y-scaling in Q12 format (unit scaling = 4096)
    SInt32 shftx   // x-shift (in pixel)
    SInt32 shfty   // y-shift (in pixel)
);

Instruction

Set the fixed-point screen mapping matrix. The scaling part of input is in Q12 Fixed Point Format. The translation part is in number of pixels. Input range is not checked.

Reference

BREW API I3D_SetScreenMapping


SFB3D::SetTexture
Set texture to be used in 3D rendering.
[ public ]
SFCError SetTexture(
    AEE3DTexture* texture   // pointer to a texture object
);

Description

Set texture to be used in 3D rendering. A null input pointer indicates that the corresponding texture image will not be used. Texture is initialized to null by default.

Reference

BREW API I3D_SetTexture


SFB3D::SetViewDepth
Set view depth to be used in graphics context. Objects outside the view depth will not be rendered.
[ public ]
SFCError SetViewDepth(
    UInt16 nearView   // the near view plane (1 <= z0 <= z1)
    UInt16 farView    // the far view plane ( z0 < z1 < 32767 )
);

Description

The default view depth is the whole range of Z-buffer ( 0 - 65535 ).

Reference

BREW API I3D_SetViewDepth


SFB3D::StartFrame
This function will not block but will run asynchronously. It will tell the 3D graphics engine to start processing and rendering the current frame.
[ public ]
SFCError StartFrame(Void);

Reference

BREW API I3D_StartFrame


SFB3D::UnregisterEventNotify
Unregister the event callback function.
[ public ]
SFCError UnregisterEventNotify(Void);

Description

When call this function, it is the same as SFB3D::RegisterEventNotify with a "null" second parameter.

Reference

SFB3D::RegisterEventNotify