# Ninja Library Specification

To Japanese

## index

01.System Functions
02.Matrix Functions
03.Collision Functions
04.Mathematical Functions
05.2D Graphics Functions
06.3D Graphics Functions
07.Light Functions
08.Scroll Functions
09.Modeling Functions
10.View Functions
11.Texture Functions
12.Sprite Functions
13.Debugging Functions
14.Special Effects Functions
15.Motion Functions
16.Memory Functions
17.Drawing Functions
18.Input Functions

| This function will be deleted in future.

01.System Functions | index

| 02 | njColorBlendingMode |
    Sets Color Blending Mode
| 03 | njExitSystem |
    Performs system termination processing.
| 04 | njIgnoreTextureAlphaMode |
    Sets Texture Alpha Mode
| 05 | njInitSystem |
    Initializes the system.
| 06 | njInitVertexBuffer |
    Allocates the buffers for registration of vertex data.
| 07 | njMipmapAdjust |
    Adjusts Mipmap Level of Textures.
| 09 | njPolygonCullingMode |
    Sets Polygon Culling Mode
| 10 | njPolygonCullingSize |
    Sets Polygon Size for Culling
| 11 | njSetBackColor |
    Sets background color.
| 12 | njSetVSyncFunction |
    Registers the vertical sync interrupt callback function.
| 14 | njSuperSampleMode |
    Sets texture super sample.
| 15 | njTextureClampMode |
    Sets the texture clamp.
| 16 | njTextureFilterMode |
    Sets the texture filter.
| 17 | njTextureFlipMode |
    Sets the texture flip.
| 18 | njTextureShadingMode |
    Sets Texture Shading Mode
| 19 | njVersion |
    Gets the library version.
| 20 | njWaitVSync |
    Waits for a vertical interrupt.

02.Matrix Functions | index

| 01 | njAddMatrix |
    Performs matrix addition.
| 02 | njAddVector |
    Performs vector addition.
| 03 | njCalcPoint |
    Applies matrix conversion to an arbitrary point.
| 04 | njCalcVector |
    Applies matrix conversion to an arbitrary vector.
| 05 | njClearMatrix |
    Clears the matrix stack.
| 06 | njDetMatrix |
    Determines a matrix expression.
| 07 | njGetMatrix |
    Gets a copy of the current matrix.
| 08 | njInitMatrix |
    Initializes the matrix stack.
| 09 | njInnerProduct |
    Obtains the inner product of two vectors.
| 10 | njInvertMatrix |
    Obtains the inverse (reversed rows/columns) of a matrix.
| 11 | njMirror |
    Obtains the mirror image of an arbitrary boundary surface.
| 12 | njMultiMatrix |
    Performs matrix multiplication.
| 13 | njOuterProduct |
    Obtains the outer product of two vectors.
| 14 | njPopMatrix |
    Pops the matrix stack.
| 15 | njProject |
    Throws a parallel project onto an arbitrary picture plane.
| 16 | njProject2 |
    Projects a transparent view onto an arbitrary picture plane.
| 17 | njProjectScreen |
    Projects an arbitrary point onto the screen.
| 18 | njPushMatrix |
    Pushes the matrix stack.
| 19 | njResMatrix |
    (Unsupported)
| 20 | njRotate |
    Rotates a matrix around an arbitrary axis.
| 21 | njRotateX |
    Applies a matrix that gives a rotation around the X axis.
| 22 | njRotateXYZ |
    Applies a matrix that gives rotation around X, Y, and Z axes.
| 23 | njRotateY |
    Applies a matrix that gives rotation around Y axis.
| 24 | njRotateZ |
    Applies a matrix that gives rotation around Z axis.
| 25 | njScale |
    Scales a matrix.
| 26 | njScaleV |
    Scales a matrix.
| 27 | njScalor |
    Returns the scalar of an arbitrary vector.
| 28 | njScalor2 |
    Returns the square of the scalar of an arbitrary vector.
| 29 | njSetMatrix |
    Copies an arbitrary matrix.
| 30 | njSubMatrix |
    Performs matrix subtraction.
| 31 | njSubVector |
    Performs vector subtraction.
| 32 | njTranslate |
    Applies a matrix that gives parallel translation along each axis.
| 33 | njTranslateV |
    Moves a matrix laterally.
| 34 | njTransposeMatrix |
    Transposes a matrix.
| 35 | njUnitMatrix |
    Converts an arbitrary matrix to a unit matrix.
| 36 | njUnitVector |
    Converts an arbitrary vector to a unit vector.

03.Collision Functions | index

| 01 | njDistanceL2L |
    Returns the distance between two lines.
| 02 | njDistanceL2PL |
    Returns the distance between a line and a plane.
| 03 | njDistanceP2L |
    Returns the distance between a point and a line.
| 04 | njDistanceP2P |
    Returns the distance between two points.
| 05 | njDistanceP2PL |
    Returns the distance between a point and a line.
| 06 | njDistancePL2PL |
    Returns the distance between two planes.
| 07 | njGetPnaneNormal |
    Finds the vector that is normal to a plane.
| 08 | njGetPnaneNormal2 |
    Finds the vector that is normal to a plane.
| 09 | njIsParalellL2L |
    Returns whether two lines are parallel.
| 10 | njIsParalellL2PL |
    Returns whether a line and a plane are parallel.
| 11 | njIsParalellPL2PL |
    Returns whether two planes are parallel.

04.Mathematical Functions | index

| 01 | njAbs |
    Returns an absolute value.
| 02 | njArcCos |
    Returns an arc cosine (ArcCos).
| 03 | njArcCosec |
    Returns an arc cosecant.
| 04 | njArcCot |
    Returns an arc cotangent.
| 05 | njArcSec |
    Returns an arc secant.
| 06 | njArcSin |
    Returns an arc sine.
| 07 | njArcTan |
    Returns an arc tangent.
| 08 | njArcTan2 |
    Returns an arc tangent (ArcTan2).
| 09 | njCeil |
    Returns the smallest integer not less than n (ceiling function).
| 10 | njCos |
    Returns a cosine.
| 11 | njCosec |
    Determines the cosecant.
| 12 | njCosech |
    Determines the hyperbolic cosecant.
| 13 | njCosh |
    Determines the hyperbolic cosine.
| 14 | njCot |
    Determines the cotangent.
| 15 | njCoth |
    Determines the hyperbolic cotangent.
| 16 | njExp |
    Determines exponents.
| 17 | njFloor |
    Returns the largest integer not greater than n (floor function).
| 18 | njFraction |
    Returns the decimal fraction.
| 19 | njHypot |
    Dertermines length of a hypotenuse.
| 20 | njInvertSqrt |
    Returns the inverse square root.
| 21 | njLog |
    Returns the natural logarithm.
| 22 | njLog10 |
    Returns the base 10 logarithm.
| 23 | njLog2 |
    Returns the base 2 logarithm.
| 24 | njPow |
    Returns the power of a number.
| 25 | njRandom |
    Generates a random number.
| 26 | njRandomSeed |
    Sets the random number seed.
| 27 | njRoundOff |
    Rounds down the decimal fraction.
| 28 | njRoundUp |
    Rounds up the decimal fraction.
| 29 | njSec |
    Determines a secant.
| 30 | njSech |
    Determines a hyperbolic secant.
| 31 | njSin |
    Determines a sine.
| 32 | njSinh |
    Determines a hyperbolic sine.
| 33 | njSqrt |
    Returns a square root
| 34 | njTan |
    Determines a tangent.
| 35 | njTanh |
    Determines a hyperbolic tangent.
| 36 | njOverhauserSpline |
    Overhauser spline correction function
| 37 | njLinear |
    Line shape correction function
| 38 | njKochanekSpline |
    Kochanek spline correction function
| 39 | njHermite |
    Hermite spline correction function
| 40 | njCubicBezier |
    3D Bezier spline correction function
| 41 | njCombination |
    Combination function
| 42 | njCardinalSpline |
    Cardinal spline correction function
| 43 | njBezier |
    Bezier correction function

05.2D Graphics Functions | index

| 01 | njDrawCircle2D |
    Draws circles on a 2D screen.
| 02 | njDrawLine2D |
    Draws lines on a 2D screen.
| 03 | njDrawPoint2D |
    Draws points on a 2D screen.
| 04 | njDrawPolygon2D |
    Draws a polygon on a 2D screen.
| 05 | njDrawTriangle2D |
    Draws triangles on a 2D screen.

06.3D Graphics Functions | index

| 01 | njDrawLine3D |
    Draws lines in 3D space.
| 02 | njDrawPoint3D |
    Draws points in 3D space.
| 03 | njDrawPolygon3D |
    Draws a polygon in 3D space.
| 04 | njDrawTriangle3D |
    Draws triangles in 3D space.

07.Light Functions | index

| 01 | njSetLightAlpha |
    Sets the changes of alpha against material, whose light is set by njCreateLight.
| 02 | njCreateLight |
    Defines a light source type and registers a new light.
| 03 | njDeleteLight |
    Deletes a light created by njCreateLight.
| 04 | njLightOff |
    Deactivates a light created by njCreateLight (turns off the light).
| 05 | njLightOn |
    Activates a light created by njCreateLight (turns on the light).
| 06 | njMultiLightMatrix |
    Multiplies a matrix with a light matrix.
| 07 | njRotateLightX |
    Rotates a light matrix around the X axis.
| 08 | njRotateLightXYZ |
    Rotates a light matrix around the X, Y, and Z axes.
| 09 | njRotateLightY |
    Rotates a light matrix around the Yaxis.
| 10 | njRotateLightZ |
    Rotates a light matrix around the Z axis.
| 11 | njSetLightAngle |
    Sets the limit angle of a light created with njCreateLight.
| 12 | njSetLightColor |
    Sets the color of light defined by njCreateLight.
| 13 | njSetLightDirection |
    Sets the directrion of light defined by njCreateLight.
| 14 | njSetLightIntensity |
    Sets the intensity of light defined using njCreateLight.
| 15 | njSetLightLocation |
    Sets the location of light defined by njCreateLight.
| 16 | njSetLightRange |
    Sets the limit distance of a light created with njCreateLight.
| 17 | njSetUserLight |
    Assigns a user-defined light function to a light.
| 18 | njTranslateLight |
    Applies a matrix that gives parallel translation along each axis.
| 19 | njTranslateLightV |
    Moves a light matrix laterally according to a directional vector.
| 20 | njUnitLightMatrix |
    Unitizes a light matrix.
| 21 | njSetLight |
    Unitizes a light matrix.
| 23 | njLightAllOn |
    This function reflects the light set at njCreateLight.
| 24 | njLightAllOff |
    This function does not reflect all the lights set at njCreateLight.
| 25 | njDeleteAllLight |
    This function deletes all the lights set at njCreateLight.

08.Scroll Functions | index

| 01 | njDrawScroll |
    Draws a 2D scroll surface.

09.Modeling Functions | index

| 01 | njControl3D |
    Controls the drawing surface for a 3D object.
| 02 | njDrawModel |
    Draws a model.
| 03 | njDrawObject |
    Draws an object.
| 04 | njFastDrawModel |
    Draws Models
| 05 | njFastDrawObject |
    Draws objects
| 06 | njInit3D |
    Initializing 3D system.
| 07 | njSetConstantAttr |
    Sets model attributes.
| 08 | njSetConstantMaterial |
    Sets model attributes.
| 09 | njSetDepthQueue |
    Sets depth queue.
| 10 | njSimpleDrawObject |
    Draws objects.
| 11 | njSimpleDrawModel |
    Draws models.

10.View Functions | index

| 01 | njCalcScreen |
    Projects points in 3D space onto the screen, then finds the screen coordinates to which the points are projected.
| 02 | njClip2D |
    Specifies the drawing area on the screen.
| 03 | njClipZ |
    Specifies the limit values of near clipping and far clipping.
| 04 | njForwardViewAbsolute |
    Moves the view location in the direction of the view. (Absolute move)
| 05 | njForwardViewRelative |
    Moves the view location along the viewline. (Relative move)
| 06 | njInitView |
    Initializes the view.
| 07 | njLookAtView |
    Changes the view direction towards point (x, y, z).
| 08 | njLookAtViewV |
    Changes the view direction towards point (x, y, z).
| 09 | njMultiViewMatrix |
    Multiplies a view by a matrix.
| 10 | njReturn2BaseView |
    Returns the current view to the base view.
| 11 | njRotateViewPosXAbsolute |
    Rotates the view location around the X axis. (Absolute rotation)
| 12 | njRotateViewPosXRelative |
    Rotates the view around the X axis (relative rotation).
| 13 | njRotateViewPosYAbsolute |
    Rotates the view location around the Y axis. (Absolute rotation)
| 14 | njRotateViewPosYRelative |
    Rotates the view around the Y axis (relative rotation).
| 15 | njRotateViewPosZAbsolute |
    Rotates the view location around the Z axis. (Absolute rotation)
| 16 | njRotateViewPosZRelative |
    Rotates the view around the Z axis (relative rotation).
| 17 | njRotateViewX |
    Rotates the view around the X axis (absolute rotation).
| 18 | njRotateViewXAbsolute |
    Rotates the view location around the X axis. (Absolute rotation)
| 19 | njRotateViewXRelative |
    Rotates the view around the X axis (relative rotation).
| 20 | njRotateViewXYZ |
    Rotates the view around the X, Y, and Z axes (absolute rotation).
| 21 | njRotateViewXYZAbsolute |
    Rotates the line of view around the X, Y, and Z axes. (Absolute rotation)
| 22 | njRotateViewXYZRelative |
    Rotates the view around the X, Y, and Z axes (relative rotation).
| 23 | njRotateViewY |
    Rotates the view around the Y axis (absolute rotation).
| 24 | njRotateViewYAbsolute |
    Rotates the view line around the Y axis. (Absolute rotation)
| 25 | njRotateViewYRelative |
    Rotates the view around the Y axis (relative rotation).
| 26 | njRotateViewZ |
    Rotates the view around the Z axis (absolute rotation).
| 27 | njRotateViewZAbsolute |
    Rotates the view around the Z axis. (Absolute rotation)
| 28 | njRotateViewZRelative |
    Rotates the view around the Z axis (relative rotation).
| 29 | njSetAspect |
    Sets the screen aspect ratio.
| 30 | njSetBaseView |
    Sets the current view as the base view.
| 31 | njSetPerspective |
    Sets the perspective in horizontal direction.
| 32 | njSetScreen |
    Sets the screen.
| 33 | njSetScreenDist |
    Sets the distance from the perspective to the screen.
| 34 | njSetView |
    Specifies a user-defined view as the current view.
| 35 | njTranslateView |
    Translates the view along the X, Y, and Z axes (absolute translation).
| 36 | njTranslateViewAbsolute |
    Moves the view location along the X, Y, and Z axes. (Absolute move)
| 37 | njTranslateViewRelative |
    Translates the view along the X, Y, and Z axes (relative translation).
| 38 | njTranslateViewV |
    Translates the view along the X, Y, and Z axes (absolute translation).
| 39 | njTranslateViewVAbsolute |
    Moves the view location along the X, Y, and Z axes. (Absolute move)
| 40 | njTranslateViewVRelative |
    Translates the view along the X, Y, and Z axes (relative translation).
| 41 | njUnitBaseViewVector |
    Converts the original view vector to a unit vector.
| 42 | njUnitCurrentViewVector |
    Converts the view vector of the current view to a unit vector.
| 43 | njUnitViewMatrix |
    Sets a unit matrix to the view matrix.
| 44 | njUnitViewVector |
    Converts the view vector to a unit vector.

11.Texture Functions | index

| 01 | njCalcTexture |
    Calculates the remaining texture memory size
| 02 | njGetTextureNumG |
    Obtains the global index number of the current texture.
| 03 | njInitTexture |
    Sets the area used for storing texture information.
| 04 | njLoadCacheTexture |
    Sets the cache information area.
| 05 | njLoadCacheTextureNum |
    Loads a texture by texture number.
| 06 | njLoadCacheTextureNumG |
    Loads texture number globalIndex from from cache memory into texture memory.
| 07 | njLoadTexture |
    Loads a texture.
| 08 | njLoadTextureNum |
    Loads textures
| 09 | njReleaseCacheTextureNum |
    Release cashe memory
| 10 | njReleaseCacheTextureAll |
    Release all cashe memory
| 11 | njReleaseCacheTextureNumG |
    Releases cashe memory
| 12 | njReleaseTexture |
    Releases texture memory
| 13 | njReleaseTextureNum |
    Releases texture memory
| 14 | njReleaseTextureNumG |
    Releases texture memory
| 15 | njReleaseTextureAll |
    Release all texture memory
| 16 | njSetTexture |
    Set current texture list
| 17 | njSetTextureInfo |
    Set data into texture name structure
| 18 | njSetTextureName |
    Set data into texture name structure
| 19 | njSetTextureNum |
    Sets a texture number as the current texture.
| 20 | njSetTextureNumG |
    Sets the current texture to a global index number.
| 21 | njReLoadTextureNum |
    Reloads Textures
| 22 | njReLoadTextureNumG |
    Reloads Texutres
| 23 | njRenderTextureNum |
    Renders Texture Area
| 24 | njRenderTextureNumG |
    Renders at the Texture Area
| 25 | njSetRenderWidth |
    Sets Stride Value
| 26 | njInitCahceTextureBuffer |
    Sets a cache texture buffer.
| 27 | njInitTextureBuffer |
    Sets necessary memory for work area of a texture.

12.Sprite Functions | index

| 01 | njDrawSprite2D |
    Draws 2D sprite
| 02 | njDrawSprite3D |
    Draws 3D sprite

13.Debugging Functions | index

| 01 | njPrintB |
    Displays a value in binary notation.
| 02 | njPrintC |
    Displays a character string.
| 03 | njPrintColor |
    Specifies the character color.
| 04 | njPrintD |
    Displays a value in decimal notation.
| 05 | njPrintF |
    Displays a floating point decimal value.
| 06 | njPrintH |
    Displays a value in decimal notation.
| 07 | njFrameBufferBmp |
    Converts Frame Buffer To Bit Map Image
| 08 | njPrintSize |
    Specifies Character Size

14.Special Effects Functions | index

| 01 | njExcuteFade |
    Excutes the fade effect.
| 02 | njFadeDisable |
    Disables the fade effect.
| 03 | njFadeEnable |
    Enables the fade effect.
| 04 | njFogDisable |
    Disables the fog effect.
| 05 | njFogEnable |
    Enables the fog effect.
| 06 | njGenerateFogTable |
    Creates Fog Table.
| 07 | njGenerateFogTable2 |
    Creates Fog Table and Sets Density.
| 08 | njGenerateFogTable3 |
    Creates Fog Table and Sets Density.
| 09 | njSetFadeColor |
    Specifies the fade color.
| 10 | njSetFogColor |
    Specifies the fog color.
| 11 | njSetFogDensity |
    Specifies the fog density.
| 12 | njSetFogTable |
    Sets a user-defined fog table.

15.Motion Functions | index

| 01 | njAction |
    Drawing motion
| 02 | njDrawMotion |
    Drawing Motion
| 03 | njFastAction |
    Draws Motion
| 04 | njFastDrawMotion |
    Draws Motion
| 05 | njSetMotionCallback |
    Registering motion callback routine
| 06 | njActionLink |
    Links motions.
| 07 | njDrawMotionLink |
    Links motions.
| 08 | njDrawShapeMotionLink |
    Links motions that include shapes.
| 09 | njDrawShapeMotionLink |
    Registering motion callback routine
| 10 | njFastAction |
    Registering motion callback routine
| 11 | njFastActionLink |
    Links motions.
| 12 | njFastDrawMotion |
    Executes motion.
| 13 | njFastDrawMotionLink |
    Links motions.
| 14 | njFastDrawShapeMotion |
    Executes motion that includes shapes.
| 15 | njFastDrawShapeMotionLink |
    Links motions that include shapes.
| 16 | njDrawShapeMotion |
    Executes motion that includes shapes.
| 17 | njSetNextMotionNode |
    Update node of node motion function.
| 18 | njSetCurrentMotion |
    Set parameters of the node motion function.
| 19 | njMotionTranslate |
    This is a node motion function (move).
| 20 | njMotionTransformZXY |
    This is a node motion function (ZXY rotate).
| 21 | njMotionTransform |
    This is a node motion function
| 22 | njMotionScale |
    This is a node motion function (scale).
| 23 | njMotionRotateZXY |
    This is a node motion function (ZXY rotate).
| 24 | njMotionRotateXYZ |
    This is a node motion function (rotate).
| 25 | njGetMotionTranslate |
    This is a node motion information function (move).
| 26 | njGetMotionScale |
    This is a node motion information function (scale).
| 27 | njGetMotionRotate |
    This is a node motion information function (rotate).

16.Memory Functions | index

| 01 | njMemCopy |
    Memory Copy
| 02 | njMemCopy2 |
    Memory Copy (Word)
| 03 | njMemCopy4 |
    Memory Copy (Long)

17.Drawing Functions | index

| 01 | njDrawPolygon |
    Draws polygons without textures
| 02 | njDrawTexture |
    Draw texture polygons

18.Input Functions | index

| 01 | njGetPeripheral |
    Gets information of input device(peripheral).
| 02 | njPrintPeripheralInfo |
    Displays peripheral condition.