##### Ninja Library - Model Function

# njCnkEasyMultiDrawObject

Draws chunk model

### FORMAT

`

  void njCnkEasyMultiDrawObject( *object )
  NJS_CNK_OBJECT *object

`

### PARAMETER

  `*object` | Pointer to chunk model object

### RETURN

  None

### DESCRIPTION

  Function for chunk object with 4 light sources (dedicated). Performs drawing by coordinate transformation of chunk object with the current matrix. The only available drawing attributes are Gouraud texture and Gouraud polygon. As opposed to other model functions, light setting is performed by dedicated functions.

  njCnkSetEasyMultiLight() | Sets light
  njCnkSetEasyMultiLightSwitch() | Sets light on/off setting
  njCnkSetEasyMultiAmbient() | Sets ambient light
  njCnkSetEasyMultiLightColor() | Sets ambient light
  njCnkSetEasyMultiLightVector() | Sets parallel light source direction
  njCnkSetEasyMultiLightPoint() | Sets point light source direction
  njCnkSetEasyMultiLightRange() | Sets the effective light range
  njCnkSetEasyMultiLightMatrices() | Sets the direction and position reflections

  The following chunk formats are supported.

  Apex chunk | NJD_CV_VN
  Strip chunk | NJD_CS, NJD_CS_UVH, NJD_CS_UVN

### 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 );
      njCnkSetEasyMultiLight(4);
      njCnkSetEasyMultiLightVector(0.f, 0.f, -1.f);
      njCnkSetEasyMultiLightPoint(NJD_CNK_EASY_MULTILIGHT_2, 0.f, 0.f, -12.f);
      njCnkSetEasyMultiLightPoint(NJD_CNK_EASY_MULTILIGHT_3, 0.f, 0.f, -12.f);
      njCnkSetEasyMultiLightPoint(NJD_CNK_EASY_MULTILIGHT_4, 0.f, 0.f, -12.f);
      njCnkSetEasyMultiLightRange(NJD_CNK_EASY_MULTILIGHT_2, 6.f, 40.f);
      njCnkSetEasyMultiLightRange(NJD_CNK_EASY_MULTILIGHT_3, 6.f, 40.f);
      njCnkSetEasyMultiLightRange(NJD_CNK_EASY_MULTILIGHT_4, 6.f, 40.f);
      njCnkSetEasyMultiAmbient(0.2f, 0.2f, 0.2f);
      njCnkSetEasyMultiLightColor(NJD_CNK_EASY_MULTILIGHT_1, 0.5f, 0.4f, 0.7f);
      njCnkSetEasyMultiLightColor(NJD_CNK_EASY_MULTILIGHT_2, 1.5f, 0.0f, 0.0f);
      njCnkSetEasyMultiLightColor(NJD_CNK_EASY_MULTILIGHT_3, 0.0f, 1.5f, 0.0f);
      njCnkSetEasyMultiLightColor(NJD_CNK_EASY_MULTILIGHT_4, 0.0f, 0.0f, 1.5f);
      njCnkSetEasyMultiLightSwitch(NJD_CNK_EASY_MULTILIGHT_ALL, 1);
      while(1) {
       njClearMatrix();
       njTranslate( NULL, 0.f, 0.f, -10.f );
       njRotateXYZ( NULL, xx,yy,zz );
       njCnkEasyMultiDrawObject( object );
       xx += 257;
       yy += 179;
       zz += 193;
       njWaitVSync();
      }

### REFERENCE

  `njCnkSetEasyMultiLight()
  njCnkSetEasyMultiLightSwitch()
  njCnkSetEasyMultiAmbient()
  njCnkSetEasyMultiLightColor()
  njCnkSetEasyMultiLightVector()
  njCnkSetEasyMultiLightPoint()
  njCnkSetEasyMultiLightRange()
  njCnkSetEasyMultiLightMatrices()
  njCnkEasyMultiDrawModel()
  `

njCnkEasyMultiDrawObject

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999