SophiaFramework UNIVERSE 5.3 |
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
X | O | X | X |
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.
|
[ 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 );
[ 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.) );
[ 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) );
[ public ] SFCError GetClipRect( SFXRectanglePtr rect // clipping rectangle );
[ public ] SFCError GetCoordTransformMode( AEE3DCoordinateTransformType* type // pointer to a Coordinate Transformation type );
This function is currently not supported.
[ public ] SFCError GetCullingMode( AEE3DCullingType* facing // pointer to culling type );
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.
[ public ] SFCError GetDestination( SFBBitmapSmpPtr destBmp // SFBBitmap interface for 3D graphics frame buffer );
[ public ] SFBBitmapSmp GetDestination(Void);
[ public ] SFCError GetLight( AEE3DLightType type // light type AEE3DLight* light // pointer to the material );
[ public ] SFCError GetLightingMode( AEE3DLightingMode* mode // pointer to current lighting mode );
[ public ] SFCError GetMaterial( AEE3DMaterial* material // pointer to the material );
[ public ] SFCError GetModelViewTransform( AEE3DTransformMatrix* matrix // pointer to a transformation matrix );
Get the fixed point transformation matrix. It is copied from the ModelViewTransform member of the graphics context structure.
[ public ] SFCError GetRenderMode( AEE3DRenderType* type // pointer to a Render type );
[ 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 );
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.
[ public ] SFCError GetTexture( AEE3DTexture* texture // pointer that contains the texture from the 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) );
Get the view depth in graphics context. Objects outside the view depth will not be rendered.
[ public, static ] SFB3DSmp NewInstance( SFCErrorPtr exception = null // Error );
[ public, static ] SFB3DSmp NewInstance( AEECLSID id // Class ID SFCErrorPtr exception = null // Error );
[ public ] SFCError PopMatrix(Void);
[ public ] SFCError PushMatrix(Void);
[ 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 );
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.
[ 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 );
[ 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 );
[ 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 );
[ public ] Void ResetZBuf(Void);
[ public ] SFCError SetClipRect( SFXRectangleRef rect // pointer to a Clipping Rectangle );
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.
[ public ] SFCError SetCoordTransformMode( AEE3DCoordinateTransformType type // coordinate Transformation type );
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.
This function is currently not supported.
[ public ] SFCError SetCullingMode( AEE3DCullingType facing // either FRONT-or BACK-facing polygons will be culled );
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.
[ public ] SFCError SetDestination( SFBBitmapSmpConstRef frameBuffer // SFBBitmap interface for 3D graphics frame buffer );
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.
[ public ] SFCError SetLight( AEE3DLight* light // the value of a light to be set );
[ public ] SFCError SetLightingMode( AEE3DLightingMode mode // the lighting mode );
[ public ] SFCError SetMaterial( AEE3DMaterial* material // pointer to the material );
[ public ] SFCError SetModelViewTransform( AEE3DTransformMatrix* matrix // pointer to a Model-view transformation matrix );
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.
[ public ] SFCError SetRenderMode( AEE3DRenderType type // render type );
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.
[ 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) );
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.
[ public ] SFCError SetTexture( AEE3DTexture* texture // pointer to a texture object );
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.
[ public ] SFCError SetViewDepth( UInt16 nearView // the near view plane (1 <= z0 <= z1) UInt16 farView // the far view plane ( z0 < z1 < 32767 ) );
The default view depth is the whole range of Z-buffer ( 0 - 65535 ).
[ public ] SFCError StartFrame(Void);
[ public ] SFCError UnregisterEventNotify(Void);
When call this function, it is the same as SFB3D::RegisterEventNotify with a "null" second parameter.
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |