##### Ninja Library - Model Function

# njCnkSimpleMultiDrawObject

Draws chunk model

### FORMAT

`

  void njCnkSimpleMultiDrawObject( *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 model with the current matrix. Although this function is similar to `njCnkEasyMultiDrawObject(),` it supports environment mapping. As opposed to other model functions, light setting is performed by dedicated functions. njCnkSetSimpleMultiLight()
  njCnkSetSimpleMultiLightSwitch()
  njCnkSetSimpleMultiAmbient()
  njCnkSetSimpleMultiLightColor()
  njCnkSetSimpleMultiLightVector()
  njCnkSetSimpleMultiLightPoint()
  njCnkSetSimpleMultiLightRange()
  njCnkSetSimpleMultiLightMatrices ()

  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 );
      njCnkSetSimpleMultiLight(4);
      njCnkSetSimpleMultiLightVector(0.f, 0.f, -1.f);
      njCnkSetSimpleMultiLightPoint(NJD_CNK_SIMPLE_MULTILIGHT_2, 0.f, 0.f, -12.f);
      njCnkSetSimpleMultiLightPoint(NJD_CNK_SIMPLE_MULTILIGHT_3, 0.f, 0.f, -12.f);
      njCnkSetSimpleMultiLightPoint(NJD_CNK_SIMPLE_MULTILIGHT_4, 0.f, 0.f, -12.f);
      njCnkSetSimpleMultiLightRange(NJD_CNK_SIMPLE_MULTILIGHT_2, 6.f, 40.f);
      njCnkSetSimpleMultiLightRange(NJD_CNK_SIMPLE_MULTILIGHT_3, 6.f, 40.f);
      njCnkSetSimpleMultiLightRange(NJD_CNK_SIMPLE_MULTILIGHT_4, 6.f, 40.f);
      njCnkSetSimpleMultiAmbient(0.2f, 0.2f, 0.2f);
      njCnkSetSimpleMultiLightColor(NJD_CNK_SIMPLE_MULTILIGHT_1, 0.5f, 0.4f, 0.7f);
      njCnkSetSimpleMultiLightColor(NJD_CNK_SIMPLE_MULTILIGHT_2, 1.5f, 0.0f, 0.0f);
      njCnkSetSimpleMultiLightColor(NJD_CNK_SIMPLE_MULTILIGHT_3, 0.0f, 1.5f, 0.0f);
      njCnkSetSimpleMultiLightColor(NJD_CNK_SIMPLE_MULTILIGHT_4, 0.0f, 0.0f, 1.5f);
      njCnkSetSimpleMultiLightSwitch(NJD_CNK_SIMPLE_MULTILIGHT_ALL, 1);
      while(1) {
       njClearMatrix();
       njTranslate( NULL, 0.f, 0.f, -10.f );
       njRotateXYZ( NULL, xx,yy,zz );
       njCnkSimpleMultiDrawObject( Object );
       xx += 257;
       yy += 179;
       zz += 193;
       njWaitVSync();
      }

### REFERENCE

  `njCnkSetSimpleMultiLight()
  njCnkSetSimpleMultiLightSwitch()
  njCnkSetSimpleMultiAmbient()
  njCnkSetSimpleMultiLightColor()
  njCnkSetSimpleMultiLightVector()
  njCnkSetSimpleMultiLightPoint()
  njCnkSetSimpleMultiLightRange()
  njCnkSetSimpleMultiLightMatrices()
  njCnkSimpleMultiDrawModel()
  `

njCnkSimpleMultiDrawObject

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999