Ninja Library - Model Function

njEasyDrawModel

Draws model

FORMAT

void njEasyDrawModel( *model )
NJS_MODEL *model

PARAMETER

 *model  Pointer to model structure 

RETURN

None

DESCRIPTION

Draws the model by coordinate transformation with the current matrix. This routine has higher drawing performance than njSimpleDrawModel() function, but the only available drawing attributes are Gouraud texture and Gouraud polygon. The following functions are not supported.

Multi-angle polygon
Front/Back evaluation (Double Side only)

As opposed to other model functions, light setting is performed by dedicated functions.

 njSetEasyLight()  Sets light. 
 njSetEasyLightIntensity()  Sets light intensity. 
 njSetEasyLightColor()  Sets light color. 


EXAMPLE

sbInitSystem( NJD_RESOLUTION_640x240_NTSCNI, NJD_FRAMEBUFFER_MODE_RGB565, 1 );
njInitVertexBuffer( 500000, 0, 10000, 0, 0 );
njInitMatrix( matrix, 128, 0);
njInit3D( vbuf, 4096 );
njInitView( &view );
njSetView( &view );
njSetEasyLight( 0.f, 0.f, 1.0f );
njSetEasyLightIntensity( 1.0f, 0.0f );
njSetEasyLightColor( 1.0f, 1.0f, 1.0f );
while(1) {
 njClearMatrix();
 njTranslate( NULL, 0.f, 0.f, -10.f );
 njRotateXYZ( NULL, xx,yy,zz );
 njEasyDrawModel( Model );
 xx += 257;
 yy += 179;
 zz += 193;
 njWaitVSync();
}

NOTE

When using this function, set the image angle and aspect ratio beforehand.

REFERENCE

njSetEasyLight()
njSetEasyLightIntensity()
njSetEasyLightColor()
njEasyDrawObject()

njEasyDrawModel
COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999