Package igeCore

indi game engine

Expand source code
"""
indi game engine
"""

from igeCore._igeCore import *

Sub-modules

igeCore.apputil

indi game engine …

igeCore.devtool

indi game engine offline develop tools …

igeCore.input

Classes

class animator (...)

animator is a key frame animation data object

Constructor

anim = igeCore.animator(path)

Parameters

path : string        animation file path

Instance variables

var defaultEndTime

Default animation end time second

type : float
(read only)

var elapsedTime

Time from previous frame to current frame

type : float
(read only)

var endTime

Animation end time second

type : float
(read / write)

var evalTime

Current animation frame second

type : float
(read / write)

var loop

Whether to play loop

type : bool
(read/write)

var speed

Animation play speed

type : float
(read / write) (default 1.0)

var startTime

Animation start time second(Loop back point)

type : float
(read / write)

var totalEvalTime

Cumulative animation frame second

type : float
(read / write)

Methods

def dump(...)
def rewind(...)

Return evalTime to start time

animator.rewind()

class camera (...)

A camera is an object for rendering a scene There are two modes of projection for the camera, orthographicand perspective.

Constructor

cam = igeCore.camera(name)

Parameters

name : string (optional)
    Name of camera

Instance variables

var aspectRate

Aspect rate for perspective transformation

type : float
read / write

var farPlane

Far clip plane

type : float
read / write

var fieldOfView

Viewing angle in radians for perspective transformation

type : float
read / write

var lockon

Specifies whether to gaze at the target

type : bool read / write
(Default value is True)

var nearPlane

Near clip plane

type : float
read / write

var orthoHeight

Screen height in orthographic projection

type : float
read / write

var orthoWidth

Screen width in orthographic projection

type : float
read / write

var orthographicProjection

Set to orthographic projection mode

type : bool read / write

var pan

A radian value representing horizontal rotation along the Y axis

type : float
read / write

var position

camera position

type : pyvmath.vec3 read / write

var projectionMatrix

Projection matrix value

type : igeVmath.mat4
read only

var roll

A radian value representing vertical rotation along the X axis

type : float
read / write

var rotation

camera rotation

type : pyvmath.quat : (x,y,z,w)
read / write

var scale

camera scale

type : pyvmath.vec3 : (x,y,z)
read / write

var screenMatrix

Screen Matrix

type : igeVmath.mat4
read only

var screenOffset

Offset of 2D screen after perspective projection conversion

type : pyvmath.vec2 read / write

var screenRadian

Radians for 2D screen rotation after perspective projection transformation

type : float
read / write

var screenScale

Scale of 2D screen after perspective projection conversion

type : pyvmath.vec2 read / write

var target

Attention point.If you set it, lockon will be True

type : pyvmath.vec3 read / write

var tilt

A radian value representing vertical rotation along the X axis

type : float
read / write

var viewInverseMatrix

View matrix inverse

type : igeVmath.mat4
read only

var widthBase

When set to True, the height is obtained based on the width when calculating the angle of view in the orthographic mode.

type : bool 
read / write

Methods

def shadowShoot(...)

Render the view seen from the camera

camera.shoot(showcase, texture, clearColor, clearDepth, clearColorValue)

Parameters

showcase : igeCore.showcase
    Showcase containing the objects you want to render
texture : igeCore.texture (optional)
    texture object to render to
    If you don't set, renders to the frame buffer
clearColor : bool  (optional)
    clear textre (or frame buffer) by clearColorValue befor render
clearDepth : bool  (optional)
    clear textre (or frame buffer) depth value befor render
    whether a texture has a depth value is specified at texture generation time.
clearColorValue : pyvmath.vec4 (optional)
    texture clear color
def shoot(...)

Render the view seen from the camera

camera.shoot(showcase, texture, clearColor, clearDepth, clearColorValue)

Parameters

showcase : igeCore.showcase
    Showcase containing the objects you want to render
texture : igeCore.texture (optional)
    texture object to render to
    If you don't set, renders to the frame buffer
clearColor : bool  (optional)
    clear textre (or frame buffer) by clearColorValue befor render
clearDepth : bool  (optional)
    clear textre (or frame buffer) depth value befor render
    whether a texture has a depth value is specified at texture generation time.
clearColorValue : pyvmath.vec4 (optional)
    texture clear color
class editableFigure (...)

figure for edditing.

igeCore.editableFigure(name, newFigure)

Parameters

name : string
    Unique name of figure
newFigure : bool (optional default False)
    It will always generate a new editable figure, even if a figure with the same name exists in the system.

Instance variables

var numJoints

Number of joints

type : int read only

var numMaterials

Number of materials

type : int read only

var numMeshes

Number of meshes

type : int read only

var position

object position

type : pyvmath.vec3 : (x,y,z) read / write

var rotation

object rotation

type : pyvmath.quat : (x,y,z,w) read / write

var scale

object scale

type : pyvmath.vec3 : (x,y,z) read / write

Methods

def addDrawSet(...)

Set drawSet to the mesh

editableFigure.addDrawSet(meshName or index, offset, size)

Parameters

meshName : string
    Registered mesh name to which you want to add drawSet
index : int
    Registered mesh index to which you want to add drawSet
offset : int
    Offset of tryangle
size : int
    Num triangles
def addJoint(...)

Add joint object to the editableFigure

editableFigure.addJoint(jointName, scaleCompensate, parentJointName)

Parameters

jointName : string
scaleCompensate : bool(optional)
    When it is True, it does not inherit the scale value of the parent joint
parentJointName : string (optional)
    Parent joint name
def addMaterial(...)

Add new material object to the editableFigure

editableFigure.addMaterial(materialName, shaderGen)

Parameters

materialName : string
    Unique name of material
shaderGen : igeCore.shaderGenerator
    shaderGenerator object

Notes

If the material name is already registered, 
discard the old one and register again.
Update mesh information if the mesh already refers
def addMesh(...)

Add new mesh object to the editableFigure

editableFigure.addMesh(meshName, materialName)

Parameters

meshName : string
    Unique name of mesh
materialName : string
    Registered material names that you want to assign to the mesh
def clear(...)

Reset all data

editableFigure.clear()

def clearMesh(...)

Reset all mesh data

editableFigure.clearMesh()

def connectAnimator(...)

Apply animation data to the model.

editableFigure.connectAnimator(slot, anime)

Parameters

slot : int
    There are 6 slots, and the final motion is output by the following calculation.

    A0* A1 + B0 * B1 + C0 * C1
   (* :weighted average , + : Additive synthesis)

   Slots specify the following values 
   igeCore.ANIMETION_SLOT_A0
   igeCore.ANIMETION_SLOT_A1
   igeCore.ANIMETION_SLOT_B0
   igeCore.ANIMETION_SLOT_B1
   igeCore.ANIMETION_SLOT_C0
   igeCore.ANIMETION_SLOT_C1

anime : string or igeCore.animator
    Animation name or igeCore.animator object

    File name of the underlying motion data

Examples

editableFigure.connectAnimator(igeCore.ANIMETION_SLOT_A0, 'animationA') editableFigure.connectAnimator(igeCore.ANIMETION_SLOT_A1, 'animationB') editableFigure.setBlendingWeight(igeCore.ANIMETION_PART_A), 0.5)

It becomes the middle posture of animationA and animationB

def dump(...)
def enableAlphaModeByTexture(...)
def getAABB(...)

Calclate axis aligned bounding box

min, max, = editableFigure.getMeshAABB(name or index)

Parameters

name : string  (optional)
    The name of the mesh to calclate AABB
index : int  (optional)
    Index number of mesh to calclate AABB

    If the parameter is not specified or -1 is specified, 
    the AABB of the entire figure is calculated.

Returns

min : vec3
    minimum edge of bounding box
max : vec3
    maximum edge of bounding box
def getBlendingWeight(...)

Get weight of weighted average of animation part

weight = editableFigure.getBlendingWeight(part)

Parameters

part : int
    Animation part for which you want to obtain a weighted average

             Specify the following value
    igeCore.ANIMETION_PART_A
    igeCore.ANIMETION_PART_B
    igeCore.ANIMETION_PART_C

Returns

weight
    Weighted average value specified for each part
def getCamera(...)

Get camera information included in the scene

camera = editableFigure.getCamera(cameraName)

Parameters

cameraName : string
    Name of camea node
    If omitted, the first camera found is returned.
    It is not necessary to specify a name if the scene contains only one camera

Returns

camera : igeCore.camera
    camera object
def getJoint(...)

Get the value of joint after animation calculation in world coordinate system

position, rotation, scale = editableFigure.getJoint(jointName or jointIndex, space)

Parameters

jointName : string
    The name of the joint you want to get
jointIndex : int
    The index of the joint you want to get
    space : int (optional)  
            Coordinate system of the value to get
           (core.WorldSpace or core.LocalSpace)
    Returns

position : igeVmath.Vec3
    position of joint
rotation : igeVmath.Quat
    rotation of joint
scale : igeVmath.Vec3
    scale of joint
def getJointIndex(...)

Get joint indexNo from joint name.

index = editableFigure.getJointIndex(name)

Parameters

name : string
    joint name

Returns

index : int
    joint indexNo   
    return -1 if joint is not found
def getJointName(...)

Get joint name.

name = editableFigure.getJointName(index)

Parameters

index : int  (optional)
    Index number of joint

Returns

name : string
    joint name      
    None if the index is out of range
def getJointParentIndex(...)

Returns the index of the parent joint of the specified joint

parentindex = figure.getJointParentIndex(jointName or index)

Parameters

    jointName : string
            The name of the joint
    index : int
            The index of the joint

Returns

    parentindex : int
            The parent joint index
def getMaterialIndex(...)

Get material indexNo from material name.

index = editableFigure.getMaterialIndex(name)

Parameters

name : string
    material name

Returns

index : int
    material indexNo        
    return -1 if material is not found
def getMaterialName(...)

Get material name.

name = editableFigure.getMaterialName(index)

Parameters

index : int  (optional)
    Index number of material

Returns

name : string
    material name   
    None if the index is out of range
def getMaterialParam(...)

Get material parameters

value = figure.getMaterialParam(materialName, paramName)

Parameters

    materialName : string (or int)
            string of the material name or integer of material index value.for which you want to get parameters
    paramName : string
            parameter name you want to get value.
            SystemAlpha                             Float
            DiffuseColor                    Float4
            Bumpiness                               Float
            SpecularParams                  Float2
            SpecularStrength                Float
            SpecularPower                   Float
            ReflectionStrength              Float
            FresnelMin                              Float
            FresnelExp                              Float
            SurfaceColor                    Float3
            FuzzySpecColor                  Float3
            SubColor                                Float3
            RollOff                                 Float
            VelvetStrength                  Float
            OverlayBumpiness                Float
            OverlayStrength                 Float
            GlassParams                             Float3
            GlassStrength                   Float
            Curvature                               Float
            UpsideDown                              Float
            ParallaxBias                    Float2
            ParallaxBiasX                   Float
            ParallaxBiasY                   Float
            Time                                    Float
            ScrollSpeedSet1                 Float2
            ScrollSpeedSet2                 Float2
            ScrollSpeedSet3                 Float2
            OffsetSet1                              Float2
            OffsetSet2                              Float2
            DistortionStrength              Float
            AlphaRef                                Float
            CoverAddition                   Float
            LightMapPower                   Float
            LightMapStrength                Float
            Saturation                              Float
            OffsetSet3                              Float2
            Fat                                             Float
            RotationSet1                    Float
            RotationSet2                    Float
            RotationSet3                    Float
            ScaleSet1                               Float2
            ScaleSet2                               Float2
            ScaleSet3                               Float2
            ZBias                                   Float
            InnerGrowAValue                 Float3
            InnerGrowBValue                 Float3
            LocalIntensity                  Float
            InnerGrowAColor                 Float3
            InnerGrowBColor                 Float3
            SepiaStrength                   Float
            ViewOffset                              Float3
            ColorSamplerScale               Float2
            BloomLimit                              Float
            BlurOffset                              Float2
            BloomScale                              Float
            ShadowDensity                   Float
            DofParams                               Float4
            DofOptions                              Float4
            DofGrayScale                    Float
            LightColor                              Float4
            MulColor                                Float4
            ScreenVertexSize                Float4
            ColorTextureSize                Float
            ColorSampler                    Texture
            NormalSampler                   Texture
            EnvSampler                              Texture
            CLUTSampler                             Texture
            LightSampler                    Texture
            OverlayColorSampler             Texture
            OverlayNormalSampler    Texture
            EnvsSampler                             Texture
            GlowACLUTSampler                Texture
            GlowBCLUTSampler                Texture
            ColorCorrectionSampler  Texture
            BlurredSampler                  Texture
            DepthSampler                    Texture

Returns

    value : float or igeVmath.vec2 or igeVmath.vec3 or igeVmath.vec4 or igeCore.texture
            Gets the value corresponding to the specified parameter name from the shader..
def getMeshAlpha(...)

Get mesh alpha value.

alpha = editableFigure.setMeshAlpha(meshName)

Parameters

    meshName : string (or int)
            string of mesh name or int of mesh index to set alpha value.
    Returns

    alpha : float
            alpha values.
def getMeshIndex(...)

Get mesh indexNo from mesh name.

index = editableFigure.getMeshIndex(name)

Parameters

name : string
    mesh name

Returns

index : int
    mesh indexNo    
    return -1 if mesh is not found
def getMeshName(...)

Get mesh name.

name = editableFigure.getMeshName(index)

Parameters

index : int  (optional)
    Index number of mesh

Returns

name : string
    mesh name       
    None if the index is out of range
def getMeshPrimitiveType(...)

Get the primitive type of Mesh.

type = editableFigure.getMeshPrimitiveType(meshName)

Parameters

    meshName : string (or mesh index : int)
            string of mesh name or int of mesh index to get the value.
    Returns

    type : int
            primirive type.
def getNumMeshTriangles(...)

Get the number of polygons in the mesh.

number = editableFigure.getNumMeshTriangles(meshName)

Parameters

    meshName : string (or int)
            string of mesh name or int of mesh index to get the value.
    Returns

    number : int
            number of triangles.
def getNumMeshVertices(...)

Get the number of vertices in the mesh.

number = editableFigure.getNumMeshVertices(meshName)

Parameters

    meshName : string (or int)
            string of mesh name or int of mesh index to get the value.
    Returns

    number : int
            number of vertices.
def getShaderGenerator(...)

Get shaderGenerator.

Returns the ShaderGenerator for the specified material.

shaderGen = editableFigure.getShaderGenerator(materialName)

Parameters

    materialName : string (or int)
            string of material name or int of material index.
    Returns

    shaderGen : igeCore.shaderGenerator
            shaderGenerator object.
def getTextureSource(...)

Get information about the textures being loaded

texinfo = editableFigure.getTextureSource()

Returns

texinfo : tuple(dict)
    'path' : file path
    'wrap' :wrap mode 
    'normal' : normal map or not

Notes

wrap & normal can be used to improve the quality of data conversion.
def getTriangles(...)

Get traiangle index data of the mesh object

triangles = editableFigure.getTriangles(meshName or index, data, offset, size)

Parameters

meshName : string
    Registered mesh name to which you want to get triangle index
index : string
    Registered mesh index to which you want to get triangle index
offset : int (optional)
    Start triangle position to get triangles
size : int (optional)
    Number of triangles  to get

Returns

    triangles :tuple of integer
            Triangle indices array
def getVertexElements(...)

Get vertex data from the mesh object

editableFigure.getVertexElements(meshName or index, attributeType, offset, size)

Parameters

meshName : string
    Registered mesh name to which you want to add vertex information
index : int
    Registered mesh index No to which you want to get vertex information
attributeType : int
    Vertex element type
    One of the following values

    igeCore.ATTRIBUTE_ID_POSITION
    igeCore.ATTRIBUTE_ID_NORMAL
    igeCore.ATTRIBUTE_ID_TANGENT
    igeCore.ATTRIBUTE_ID_BINORMAL
    igeCore.ATTRIBUTE_ID_UV0
    igeCore.ATTRIBUTE_ID_UV1
    igeCore.ATTRIBUTE_ID_UV2
    igeCore.ATTRIBUTE_ID_UV3
    igeCore.ATTRIBUTE_ID_COLOR
    igeCore.ATTRIBUTE_ID_BLENDINDICES
    igeCore.ATTRIBUTE_ID_BLENDWEIGHT
    igeCore.ATTRIBUTE_ID_PSIZE
offset : int (optional)
    Start position to get vertex elements
    0 if omitted.
size : int (optional)
    Numver of vertex elements to get.
    If omitted, all data after the offset.
def importFigure(...)

Import the figure (pyxf) file.

rv = editableFigure.importFigure(path)

Parameters

path : string
    figure file path

Returns

rv : bool
    Success or failure of reading
def jointNameToIndex(...)

Get Joint index from Joint name

jointIndex = editablefigure.jointNameToIndex(jointName)

Parameters

jointName : string
    The name of the joint you want to get

Returns

    jointIndex : int
            The index of joint
            If there is no parent joint (root joint), -1 is returned.
def mergeSameMaterialMesh(...)

Improve drawing efficiency by merging meshes that share the same material into one.

editableFigure.mergeSameMaterialMesh()

def removeUnreferencedVertices(...)

Removes useless vertices that are not referenced from the index.

editableFigure.removeUnreferencedVertices()

def replaceTextureSource(...)

Rewrites the texture information loaded inside

editableFigure.replaceTextureSource(oldTex, newTex)

Parameters

oldTex : dict {'path':path, 'wrap':wrap, 'normal':normal}
newTex : dict {'path':path, 'wrap':wrap, 'normal':normal}

Notes

Used when rewriting the texture file path
def saveAnimation(...)

Export animation data

under construction

def saveFigure(...)

Export to figure format

editableFigure.saveFigure(filePath, excludeAnime, excludeSkeleton)

Parameters

filePath : string
    Output file path
excludeAnime : bool (optional)
    Do not include animation data
excludeSkeleton : bool (optional)
    Do not include skeleton data

Notes

The figure format is optimized, so
It is more efficient to create a figure in advanceand then load it,
rather than using Editable Figure directly
def saveSkeleton(...)

Export skeleton data

under construction

def setBlendingWeight(...)

Specifies the weight of the weighted average of animation parts

editableFigure.setBlendingWeight(part, weight)

Parameters

part : int
    Animation part for which you want to specify weights

             Specify the following value
    igeCore.ANIMETION_PART_A
    igeCore.ANIMETION_PART_B
    igeCore.ANIMETION_PART_C

weight : float
    Specify the weight of weighted average in the range of 0.0 to 1.0
def setBoxGeometory(...)
def setDrawSetRenderState(...)

Set render state for drawSet

editableFigure.setDrawSetRenderState(meshName or index, drawSetNo, paramName, value1, value2, value3, value4)

Parameters

meshName : string
    Registered mesh name to which you want to add drawSet
index : int
    Registered mesh index to which you want to add drawSet
drawSetNo : int
    Order added by AddDrawSet()
paramName : string
    Render states name
    The available renderstate is the same as setMaterialRenderState
value1 : float or int or bool
    Render state parameter
value2 : float or int or bool
    Render state parameter
value3 : float or int or bool
    Render state parameter
value4 : float or int or bool
    Render state parameter
def setJoint(...)

Set the value of joint in world coordinate system

editableFigure.setJoint(jointName or jointIndex, position, rotation, scale, space)

Parameters

jointName : string
    The name of the joint you want to get
jointIndex : int
    The index of the joint you want to get
position : igeVmath.Vec3 (optional)
    position of joint
rotation : igeVmath.Quat (optional)
    rotation of joint
scale : igeVmath.Vec3 (optional)
    scale of joint
    space : int (optional)  
            Coordinate system of the value to get
           (core.WorldSpace or core.LocalSpace)
def setJointParent(...)

Sets the parent John of the specified joint

editableFigure.setJointParent(jointName or jointIndex, parentJointName or parentJointIndex)

Parameters

jointName : string
    The name of the joint
jointIndex : int
    The index of the joint
parentJointName : string
    The name of the parent joint
parentJointIndex : int
    The index of the parent joint
def setMaterialParam(...)

Set material parameters

editableFigure.setMaterialParam(materialName, paramName, paramValue)

Parameters

    materialName : string
            Name of the material for which you want to set parameters
    paramName : string
            Name of the parameter to pass to the shader
            SystemAlpha                     Float
            DiffuseColor            Float4
            Bumpiness                       Float
            SpecularParams          Float2
            SpecularStrength        Float
            SpecularPower           Float
            ReflectionStrength      Float
            FresnelMin                      Float
            FresnelExp                      Float
            SurfaceColor            Float3
            FuzzySpecColor          Float3
            SubColor                        Float3
            RollOff                         Float
            VelvetStrength          Float
            OverlayBumpiness        Float
            OverlayStrength         Float
            GlassParams                     Float3
            GlassStrength           Float
            Curvature                       Float
            UpsideDown                      Float
            ParallaxBias            Float2
            ParallaxBiasX           Float
            ParallaxBiasY           Float
            Time                            Float
            ScrollSpeedSet1         Float2
            ScrollSpeedSet2         Float2
            ScrollSpeedSet3         Float2
            OffsetSet1                      Float2
            OffsetSet2                      Float2
            DistortionStrength      Float
            AlphaRef                        Float
            CoverAddition           Float
            LightMapPower           Float
            LightMapStrength        Float
            Saturation                      Float
            OffsetSet3                      Float2
            Fat                                     Float
            RotationSet1            Float
            RotationSet2            Float
            RotationSet3            Float
            ScaleSet1                       Float2
            ScaleSet2                       Float2
            ScaleSet3                       Float2
            ZBias                           Float
            InnerGrowAValue         Float3
            InnerGrowBValue         Float3
            LocalIntensity          Float
            InnerGrowAColor         Float3
            InnerGrowBColor         Float3
            SepiaStrength           Float
            ViewOffset                      Float3
            ColorSamplerScale       Float2
            BloomLimit                      Float
            BlurOffset                      Float2
            BloomScale                      Float
            ShadowDensity           Float
            DofParams                       Float4
            DofOptions                      Float4
            DofGrayScale            Float
            LightColor                      Float4
            MulColor                        Float4
            ScreenVertexSize        Float4
            ColorTextureSize        Float
paramValue
    Tuple of value pass to the shader
def setMaterialParamTexture(...)

Set texture material parameters

editableFigure.setMaterialParam(materialName, samplerName, textureName, pixel, width, height, wrap_s, wrap_t, minfilter, magfilter, mipfilter)

Parameters

    materialName : string
            Name of the material for which you want to set parameters
    samplerName : string
            Name of the sampler parameter to pass to the shader
            ColorSampler
            NormalSampler
            EnvSampler
            CLUTSampler
            LightSampler
            OverlayColorSampler
            OverlayNormalSampler
            EnvsSampler
            GlowACLUTSampler
            GlowBCLUTSampler
            ColorCorrectionSampler
            BlurredSampler
            DepthSampler
textureName : string (optional)
    Texture file path
pixel : binary (optional)
    binary array of rgba 32bit format image
    textureName and pixel + width, height can not be specified at the same time, 
    textureName takes precedence
width : int (optional)
    pixel image width
height : int  (optional)
    pixel image height
wrap_s : int  (optional)
    Texture horizontal wrap mode of sampler state
    The following values are available
    igeCore.SAMPLERSTATE_WRAP <- (default)
    igeCore.SAMPLERSTATE_MIRROR
    igeCore.SAMPLERSTATE_CLAMP
    igeCore.SAMPLERSTATE_BORDER
wrap_t : int  (optional)
    Texture vertical wrap mode of sampler state
    The content is the same as wrap_s
minfilter : int  (optional)
    Sampling method when expanding the texture
    The following values are available
    igeCore.SAMPLERSTATE_LINEAR <- (default)
    igeCore.SAMPLERSTATE_NEAREST
magfilter : int  (optional)
   Sampling method when reducing the texture
    The following values are available
    igeCore.SAMPLERSTATE_LINEAR
    igeCore.SAMPLERSTATE_NEAREST
    igeCore.SAMPLERSTATE_NEAREST_MIPMAP_NEAREST
    igeCore.SAMPLERSTATE_LINEAR_MIPMAP_NEAREST
    igeCore.SAMPLERSTATE_NEAREST_MIPMAP_LINEAR
    igeCore.SAMPLERSTATE_LINEAR_MIPMAP_LINEAR
mipfilter : int  (optional)
    Not used now.
def setMaterialRenderState(...)

Set render state for material

editableFigure.setMaterialRenderState(materialName, paramName, value1, value2, value3, value4)

Parameters

materialName : string
    Name of the material to which you want to add RenderState
paramName : string
    Render state name
    The following names are currently available
    alpha_func
    alpha_test_enable
    blend_func
    blend_equation
    blend_enable
    cull_face
    cull_face_enable
    depth_func
    depth_mask
    depth_test_enable
    polygon_offset
    polygon_offset_fill_enable
    color_mask
    stencil_func
    stencil_mask
    stencil_op
    stencil_test_enable
    scissor_test_enable
    scissor
value1 : float or int or bool
    Render state parameter
value2 : float or int or bool
    Render state parameter
value3 : float or int or bool
    Render state parameter
value4 : float or int or bool
    Render state parameter
def setMeshAlpha(...)

Set mesh alpha value.

if you set alpha valie is less than 1.0 mesh is going to transparent. you set alpha valie is 0, mesh rendaring is skipped.

editableFigure.setMeshAlpha(meshName, alpha)

Parameters

    meshName : string (or int)
            string of mesh name or int of mesh index to set alpha value.
            alpha : float
            alpha value.
def setMeshPrimitiveType(...)

Set the primitive type of Mesh.

editableFigure.setMeshPrimitiveType(meshName, mode)

Parameters

    meshName : string (or int)
            string of mesh name or int of mesh index to set value.
            type : int
            primitive type.
                    igeCore.GL_LINES
                    igeCore.GL_LINE_LOOP
                    igeCore.GL_LINE_STRIP
                    igeCore.GL_TRIANGLES
                    igeCore.GL_TRIANGLE_STRIP
                    igeCore.GL_TRIANGLE_FAN
                    igeCore.GL_QUADS
                    igeCore.GL_QUAD_STRIP
def setParentJoint(...)

Set the joint of another figure (or EditableFigure) as the parent joint.

editableFigure.setParentJoint(figure, jointName)

Parameters

figure : figure
    Parent figure or EditableFigure
jointName : string
    Parent joint name
def setPlaneGeometory(...)
def setShaderGenerator(...)

Set shaderGenerator.

Set shaderGenerator to specified material and replace shader.

editableFigure.setShaderGenerator(materialName, shaderGen)

Parameters

    materialName : string (or int)
            string of material name or int of material index.
            shaderGen : igeCore.shaderGenerator
            shaderGenerator object.
def setSphereGeometory(...)
def setTime(...)

Specifies the animation time applied by connectAnimator

editableFigure.setTime(time)

Parameters

time : float
    Specifies the animation time in seconds
def setTrianglePtr(...)

Set formatted triangle index list data to the mesh.

editableFigure.setTrianglePtr(meshName or index, ptr, numTriangles, dataSize)

Parameters

meshName : string
    Registered mesh name to which you want to add triangle index
index : int
    Registered mesh index to which you want to add triangle index
ptr
    Pointer of indices
numTriangles long
    Number of triangles
dataSize : int
    data byte size(2 or 4)
def setTriangles(...)

Set traiangle index data to the mesh object

editableFigure.setTriangles(meshName or index, data, offset)

Parameters

meshName : string
    Registered mesh name to which you want to add triangle index
index : string
    Registered mesh index to which you want to add triangle index
data : tuple or list
    Triangle index
offset : int (optional)
    Start triangle position to add vertex elements

Examples

#create rectangle
efig.addMesh('meshA', 'materialA');
points = ((-1, 1, 0), (1, 1, 0), (-1, -1, 0), (1, -1, 0))
efig.setVertexElements('meshA', igeCore.ATTRIBUTE_ID_POSITION, points)
tris = (0, 2, 1, 1, 2, 3)
efig.setTriangles('meshA', tris);
def setVertexElements(...)

Set vertex data to the mesh object

editableFigure.setVertexElements(meshName or index, attributeType, data, offset)

Parameters

meshName : string
    Registered mesh name to which you want to add vertex information
index : int
    Registered mesh index to which you want to add vertex information
attributeType : int
    Vertex element type
    One of the following values

    igeCore.ATTRIBUTE_ID_POSITION
    igeCore.ATTRIBUTE_ID_NORMAL
    igeCore.ATTRIBUTE_ID_TANGENT
    igeCore.ATTRIBUTE_ID_BINORMAL
    igeCore.ATTRIBUTE_ID_UV0
    igeCore.ATTRIBUTE_ID_UV1
    igeCore.ATTRIBUTE_ID_UV2
    igeCore.ATTRIBUTE_ID_UV3
    igeCore.ATTRIBUTE_ID_COLOR
    igeCore.ATTRIBUTE_ID_BLENDINDICES
    igeCore.ATTRIBUTE_ID_BLENDWEIGHT
    igeCore.ATTRIBUTE_ID_PSIZE
data : tuple or list
    Vertex elements
offset : int (optional)
    Start position to add vertex elements

Examples

efig.addMesh('meshA', 'materialA');
points = ((-1, 1, 0), (1, 1, 0), (-1, -1, 0), (1, -1, 0))
efig.setVertexElements('meshA', igeCore.ATTRIBUTE_ID_POSITION, points
def setVertexPtr(...)

Set formatted vertex data to the mesh.

editableFigure.setVertexPtr(meshName or index, ptr, numVerts, attributes)

Parameters

meshName : string
    Registered mesh name to which you want to add vertex information
index : string
    Registered mesh index to which you want to add vertex information
ptr : void* 
    Pointer of vertices
numVerts : long
    Number of vertices
attributes : tuple
    Vertex format description(ID, size, normalize, type)
def step(...)

Advances the animation applied with connectAnimator() by elapsedTime

editableFigure.step(elapsedTime)

Parameters

elapsedTime : float
    Specifies the delta animation time in seconds
    If omitted, it will be the value of igeCore.elapsedTime()
class environment (...)

Rendering environment such as light source and fog

Instance variables

var ambientColor

Ambient color
igeVmath.vec3

var ambientDirection

Ambient direction for hemisphere ambient
igeVmath.vec3

var distanceFogAlpha

alpha value of fog distance
float

var distanceFogColor

distance value of fog distance
float

var distanceFogFar

far value of fog distance
float

var distanceFogNear

near value of fog distance
float

var groundColor

Ground color for hemisphere ambient
igeVmath.vec3

var shadowColor

shadow color
igeVmath.vec3

var shadowDensity

shadow density
float

var shadowWideness

shadow wideness float

Methods

def getDirectionalLampColor(...)

Get directional lamp color

color = environment.getDirectionalLampColor(index)

Parameters

index : int
    light index no (0 - 2)

Returns

color : igeVmath.vec3
   color value of directional lamp
def getDirectionalLampDirection(...)

Get directional lamp direction

dir = environment.getDirectionalLampDirection(index)

Parameters

index : int
    light index no (0 - 2)

Returns

dir : igeVmath.vec3
   lamp direction vector
def getDirectionalLampIntensity(...)

Get intensity value of directional lamp

intensity = environment.getDirectionalLampIntensity(index)

Parameters

index : int
    light index no (0 - 2)Returns

intensity : float
    intensity value of directional lamp
def getPointLampColor(...)

Get point lamp color

color = environment.getPointLampColor(index)

Parameters

index : int
    light index no (0 - 6)

Returns

color : igeVmath.vec3
   color value of point lamp
def getPointLampIntensity(...)

Get intensity value of point lamp

intensity = environment.getPointLampIntensity(index)

Parameters

index : int
    light index no (0 - 6)Returns

intensity : float
    intensity value of point lamp
def getPointLampPosition(...)

Get point lamp position

pos = environment.getPointLampPosition(index)

Parameters

index : int
    light index no (0 - 6)

Returns

pos : igeVmath.vec3
   lamp position
def getPointLampRange(...)

Get point lamp range value

range = environment.getPointLampRange(index)

Parameters

index : int
    light index no (0 - 6)Returns

range : float
    range distance value of point lamp
def getSpotLampAngle(...)

Get angle value of spot lamp

angle = environment.getSpotLampAngle(index)

Parameters

index : int
    light index no (0 - 6)Returns

angle : float
    angle value of spot lamp
def getSpotLampColor(...)

Get spot lamp color

color = environment.getSpotLampColor(index)

Parameters

index : int
    light index no (0 - 6)

Returns

color : igeVmath.vec3
   color value of spot lamp
def getSpotLampDirection(...)

Get spot lamp direction

dir = environment.getSpotLampPosition(index)

Parameters

index : int
    light index no (0 - 6)

Returns

dir : igeVmath.vec3
   lamp direction
def getSpotLampIntensity(...)

Get intensity value of spot lamp

intensity = environment.getSpotLampIntensity(index)

Parameters

index : int
    light index no (0 - 6)Returns

intensity : float
    intensity value of spot lamp
def getSpotLampPosition(...)

Get spot lamp position

pos = environment.getSpotLampPosition(index)

Parameters

index : int
    light index no (0 - 6)

Returns

pos : igeVmath.vec3
   lamp position
def getSpotLampRange(...)

Get spot lamp range value

range = environment.getSpotLampRange(index)

Parameters

index : int
    light index no (0 - 6)Returns

range : float
    range distance value of spot lamp
def setDirectionalLampColor(...)

Set directional lamp color

environment.setDirectionalLampColor(index, color)

Parameters

index : int
    light index no (0 - 2)
value : igeVmath.vec3
    lamp color
def setDirectionalLampDirection(...)

Set directional lamp direction

environment.setDirectionalLampDirection(index, dir)

Parameters

index : int
    light index no (0 - 2)
dir : igeVmath.vec3
   lamp direction vector
def setDirectionalLampIntensity(...)

Set intensity value of directional lamp

environment.getDirectionalLampIntensity(index, value)

Parameters

index : int
    light index no (0 - 2)    value : float
    intensity value of directional lamp
def setPointLampColor(...)

Set point lamp color

environment.setPointLampColor(index, color)

Parameters

index : int
    light index no (0 - 2)
value : igeVmath.vec3
    lamp color
def setPointLampIntensity(...)

Set intensity value of point lamp

environment.getPointLampIntensity(index, value)

Parameters

index : int
    light index no (0 - 6)    value : float
    intensity value of point lamp
def setPointLampPosition(...)

Set point lamp position

environment.getPointLampPosition(index, pos)

Parameters

index : int
    light index no (0 - 6)
pos : igeVmath.vec3
   lamp position
def setPointLampRange(...)

Set point lamp range value

environment.setPointLampRange(index, range)

Parameters

index : int
    light index no (0 - 6)    range : float
    range distance value of point lamp
def setSpotLampAngle(...)

Set angle value of spot lamp

environment.getSpotLampAngle(index, value)

Parameters

index : int
    light index no (0 - 6)    value : float
    angle value of spot lamp
def setSpotLampColor(...)

Set spot lamp color

environment.setSpotLampColor(index, color)

Parameters

index : int
    light index no (0 - 2)
value : igeVmath.vec3
    lamp color
def setSpotLampDirection(...)

Set spot lamp direction

environment.getSpotLampDirection(index, dir)

Parameters

index : int
    light index no (0 - 6)
dir : igeVmath.vec3
   lamp direction
def setSpotLampIntensity(...)

Set intensity value of spot lamp

environment.getSpotLampIntensity(index, value)

Parameters

index : int
    light index no (0 - 6)    value : float
    intensity value of spot lamp
def setSpotLampPosition(...)

Set spot lamp position

environment.getSpotLampPosition(index, pos)

Parameters

index : int
    light index no (0 - 6)
pos : igeVmath.vec3
   lamp position
def setSpotLampRange(...)

Set spot lamp range value

environment.setSpotLampRange(index, range)

Parameters

index : int
    light index no (0 - 6)    range : float
    range distance value of spot lamp
class figure (...)

3D scene object.

igeCore.figure(name, cloneSkeleton, cloneMesh)

Parameters

    name : string
            Unique name of figure
    cloneSkeleton : bool
            Determine if each instance has its own Skeleton information.
    cloneMesh : bool
            Determine if each instance has its own Mesh information.

Note

    Normally, when you generate multiple figures from the same file,        
    Skeleton and Mesh informations are shared for data saving.      
    Usually it's no probrem,        
    But, if you use the set/getJoint() function     
    to directly manipulate the skeleton,    
    Editing one figure will affect the other figures as well.       
    Enabling 'cloneSkeleton' will generate the Skeleton information separately,     
    which will aboid this issue.    
    Similarly, if you use the setVertexElements() function to       
    edit the vertex directly,       
    you will get similar problems.  
    enabling 'cloneMesh' will aboid it.

Instance variables

var numAnimations

Number of registered animations

type : int (read only)

var numEmbeddedAnimations

The number of animation embedded in the file

type : int (read only)

var numJoints

Number of joints

type : int (read only)

var numMaterials

Number of materials

type : int (read only)

var numMeshes

Number of meshes

type : int (read only)

var numTextures

The number of textures linked in the file

type : int (read only)

var position

3D position of object

type : pyvmath.vec3 : (x,y,z)

var rotation

3D rotation of object

type : pyvmath.quat : (x,y,z,w)

var scale

3D scale of object

type : pyvmath.vec3 : (x,y,z)

Methods

def connectAnimator(...)

Apply animation data to the model.

figure.connectAnimator(slot, anime)

Parameters

slot : int
    There are 6 slots, and the final motion is output by the following calculation.

    A0* A1 + B0 * B1 + C0 * C1
   (* :weighted average , + : Additive synthesis)

   Slots specify the following values 
   igeCore.ANIMETION_SLOT_A0
   igeCore.ANIMETION_SLOT_A1
   igeCore.ANIMETION_SLOT_B0
   igeCore.ANIMETION_SLOT_B1
   igeCore.ANIMETION_SLOT_C0
   igeCore.ANIMETION_SLOT_C1

anime : string or igeCore.animator
    Animation name or igeCore.animator object

    File name of the underlying motion data

Examples

figure.connectAnimator(igeCore.ANIMETION_SLOT_A0, 'animationA') figure.connectAnimator(igeCore.ANIMETION_SLOT_A1, 'animationB') figure.setBlendingWeight(igeCore.ANIMETION_PART_A), 0.5)

It becomes the middle posture of animationA and animationB

def dump(...)
def getAABB(...)

Calclate axis aligned bounding box

min, max, = figure.getAABB(name or index, space)

Parameters

name : string  (optional)
    The name of the mesh to calclate AABB   
    By omitting it, the entire figure will be calculated.
index : int  (optional)
    Index number of mesh to calclate AABB

    If the parameter is not specified or -1 is specified, 
    the AABB of the entire figure is calculated. 
    space : int 
            -1 (default value)
                    Calculate AABB from vertex before animation
            0 (igeCore.LocalSpace)
                    Calculate AABB after animation in locak space
            1 (igeCore.WorldSpace)
                    Calculate AABB after animation in world space

            This function is slow as it uses the CPU to compute all vertices.
            Frequent use in real time is not recommended.

Returns

min : vec3
    minimum edge of bounding box
max : vec3
    maximum edge of bounding box
def getBlendingWeight(...)

Get weight of weighted average of animation part

weight = figure.getBlendingWeight(part)

Parameters

part : int
    Animation part for which you want to obtain a weighted average

             Specify the following value
    igeCore.ANIMETION_PART_A
    igeCore.ANIMETION_PART_B
    igeCore.ANIMETION_PART_C

Returns

weight
    Weighted average value specified for each part
def getCamera(...)

Get camera information included in the scene

camera = figure.getCamera(cameraName)

Parameters

cameraName : string
    Name of camea node
    If omitted, the first camera found is returned.
    It is not necessary to specify a name if the scene contains only one camera

Returns

camera : igeCore.camera
    camera object
def getEmbeddedAnimationName(...)

Get embedded animation name.

When converting from Collada, EXPORT_NAMES = 1 must be defined in figure.conf.

name = figure.getEmbeddedAnimationName(index)

Parameters

index : int  (optional)
    Index number of animation

Returns

name : string
    animnation file name    
    None if the index is out of range
def getEmbeddedAnimator(...)

Get animator embedded in the scene

animator = figure.getEmbeddedAnimator(animeName)

Parameters

animeName : string
    Name of anine file

Returns

animator : igeCore.animator
    animator object  or None if not found.
def getEnvironment(...)

Get environmental information included in the scene Environmental information is information such as lightingand fog.

env = figure.getEnvironment()

Returns

env : igeCore.environment
    enbironment object

environment object

Specification of environment is still under construction
 
def getJoint(...)

Get the value of joint after animation calculation in world coordinate system

position, rotation, scale = figure.getJoint(jointName or jointIndex, space)

Parameters

jointName : string
    The name of the joint you want to get
jointIndex : int
    The index of the joint you want to get
    space : int (optional)  
            Coordinate system of the value to get
           (core.WorldSpace or core.LocalSpace)
    Returns

position : igeVmath.Vec3
    position of joint
rotation : igeVmath.Quat
    rotation of joint
scale : igeVmath.Vec3
    scale of joint
def getJointIndex(...)

Get joint indexNo from joint name.

index = figure.getJointIndex(name)

Parameters

name : string
    joint name

Returns

index : int
    joint indexNo   
    return -1 if joint is not found
def getJointName(...)

Get joint name.

When converting from Collada, EXPORT_NAMES = 1 must be defined in figure.conf.

name = figure.getJointName(index)

Parameters

index : int  (optional)
    Index number of joint

Returns

name : string
    joint name      
    None if the index is out of range
def getJointParentIndex(...)

Returns the index of the parent joint of the specified joint

parentindex = figure.getJointParentIndex(jointName or index)

Parameters

    jointName : string
            The name of the joint
    index : int
            The index of the joint

Returns

    parentindex : int
            The parent joint index
def getMaterialIndex(...)

Get material indexNo from material name.

index = figure.getMaterialIndex(name)

Parameters

name : string
    material name

Returns

index : int
    material indexNo        
    return -1 if material is not found
def getMaterialName(...)

Get material name.

When converting from Collada, EXPORT_NAMES = 1 must be defined in figure.conf.

name = figure.getMaterialName(index)

Parameters

index : int  (optional)
    Index number of material

Returns

name : string
    material name   
    None if the index is out of range
def getMaterialParam(...)

Get material parameters

value = figure.getMaterialParam(materialName, paramName)

Parameters

materialName : string (or int)
    string of the material name or integer of material index value.for which you want to get parameters
paramName : string
    parameter name you want to get value.

Returns

    value : float or igeVmath.vec2 or igeVmath.vec3 or igeVmath.vec4 or igeCore.texture
            Gets the value corresponding to the specified parameter name from the shader..
def getMeshAlpha(...)

Get mesh alpha value.

alpha = figure.setMeshAlpha(meshName)

Parameters

    meshName : string (or int)
            string of mesh name or int of mesh index to set alpha value.
    Returns

    alpha : float
            alpha values.
def getMeshIndex(...)

Get mesh indexNo from mesh name.

index = figure.getMeshIndex(name)

Parameters

name : string
    mesh name

Returns

index : int
    mesh indexNo    
    return -1 if mesh is not found
def getMeshName(...)

Get mesh name.

When converting from Collada, EXPORT_NAMES = 1 must be defined in figure.conf.

name = figure.getMeshName(index)

Parameters

index : int  (optional)
    Index number of mesh

Returns

name : string
    mesh name       
    None if the index is out of range
def getMeshPrimitiveType(...)

Get the primitive type of Mesh.

type = figure.getMeshPrimitiveType(meshName)

Parameters

    meshName : string (or mesh index : int)
            string of mesh name or int of mesh index to get the value.
    Returns

    type : int
            primirive type.
def getNumMeshTriangles(...)

Get the number of polygons in the mesh.

number = figure.getNumMeshTriangles(meshName)

Parameters

    meshName : string (or int)
            string of mesh name or int of mesh index to get the value.
    Returns

    number : int
            number of triangles.
def getNumMeshVertices(...)

Get the number of vertices in the mesh.

number = figure.getNumMeshVertices(meshName)

Parameters

    meshName : string (or int)
            string of mesh name or int of mesh index to get the value.
    Returns

    number : int
            number of vertices.
def getShaderGenerator(...)

Get shaderGenerator.

Returns the ShaderGenerator for the specified material.

shaderGen = figure.getShaderGenerator(materialName)

Parameters

    materialName : string (or int)
            string of material name or int of material index.
    Returns

    shaderGen : igeCore.shaderGenerator
            shaderGenerator object.
def getTextureName(...)

Get linked texture file name.

name = figure.getTextureName(index)

Parameters

index : int  (optional)
    Index number of texture

Returns

name : string
    texture file name       
    None if the index is out of range
def getTriangles(...)

Get traiangle index data of the mesh object

triangles = figure.getTriangles(meshName or index, data, offset, size)

Parameters

meshName : string
    Registered mesh name to which you want to get triangle index
index : string
    Registered mesh index to which you want to get triangle index
offset : int (optional)
    Start triangle position to get triangles
size : int (optional)
    Number of triangles  to get

Returns

    triangles :tuple of integer
            Triangle indices array
def getVertexElements(...)

Get vertex data from the mesh object

figure.getVertexElements(meshName or index, attributeType, offset, size)

Parameters

meshName : string
    Registered mesh name to which you want to add vertex information
index : int
    Registered mesh index No to which you want to get vertex information
attributeType : int
    Vertex element type
    One of the following values

    igeCore.ATTRIBUTE_ID_POSITION
    igeCore.ATTRIBUTE_ID_NORMAL
    igeCore.ATTRIBUTE_ID_TANGENT
    igeCore.ATTRIBUTE_ID_BINORMAL
    igeCore.ATTRIBUTE_ID_UV0
    igeCore.ATTRIBUTE_ID_UV1
    igeCore.ATTRIBUTE_ID_UV2
    igeCore.ATTRIBUTE_ID_UV3
    igeCore.ATTRIBUTE_ID_COLOR
    igeCore.ATTRIBUTE_ID_BLENDINDICES
    igeCore.ATTRIBUTE_ID_BLENDWEIGHT
    igeCore.ATTRIBUTE_ID_PSIZE
offset : int (optional)
    Start position to get vertex elements
    0 if omitted.
size : int (optional)
    Numver of vertex elements to get.
    If omitted, all data after the offset.
def jointNameToIndex(...)

Get Joint index from Joint name

index = figure.jointNameToIndex(jointName)

Parameters

jointName : string
    The name of the joint you want to get

Returns

    index : int
            The index of joint
            If there is no parent joint (root joint), -1 is returned.
def killJointTransform(...)
def setBlendingWeight(...)

Specifies the weight of the weighted average of animation parts

figure.setBlendingWeight(part, weight)

Parameters

part : int
    Animation part for which you want to specify weights

             Specify the following value
    igeCore.ANIMETION_PART_A
    igeCore.ANIMETION_PART_B
    igeCore.ANIMETION_PART_C

weight : float
    Specify the weight of weighted average in the range of 0.0 to 1.0
def setJoint(...)

Set the value of joint in world coordinate system

figure.setJoint(jointName or jointIndex, position, rotation, scale, space)

Parameters

jointName : string
    The name of the joint you want to get
jointIndex : int
    The index of the joint you want to get
position : igeVmath.Vec3 (optional)
    position of joint
rotation : igeVmath.Quat (optional)
    rotation of joint
scale : igeVmath.Vec3 (optional)
    scale of joint
    space : int (optional)  
            Coordinate system of the value to get
           (core.WorldSpace or core.LocalSpace)
def setMaterialParam(...)

Set material parameters

figure.setMaterialParam(materialName, paramName, paramValue)

Parameters

materialName : string
    Name of the material for which you want to set parameters
paramName : string
    Name of the parameter to pass to the shader
paramValue
    Tuple of value pass to the shader
def setMaterialParamTexture(...)

Set texture material parameters

figure.setMaterialParam(materialName, samplerName, textureName, pixel, width, height, wrap_s, wrap_t, minfilter, magfilter, mipfilter)

Parameters

materialName : string
    Name of the material for which you want to set parameters
samplerName : string
     Name of the sampler parameter to pass to the shader
textureName : string (optional)
    Texture file path
pixel : binary (optional)
    binary array of rgba 32bit format image
    textureName and pixel + width, height can not be specified at the same time, 
    textureName takes precedence
width : int (optional)
    pixel image width
height : int  (optional)
    pixel image height
wrap_s : int  (optional)
    Texture horizontal wrap mode of sampler state
    The following values are available
    igeCore.SAMPLERSTATE_WRAP <- (default)
    igeCore.SAMPLERSTATE_MIRROR
    igeCore.SAMPLERSTATE_CLAMP
    igeCore.SAMPLERSTATE_BORDER
wrap_t : int  (optional)
    Texture vertical wrap mode of sampler state
    The content is the same as wrap_s
minfilter : int  (optional)
    Sampling method when expanding the texture
    The following values are available
    igeCore.SAMPLERSTATE_LINEAR <- (default)
    igeCore.SAMPLERSTATE_NEAREST
magfilter : int  (optional)
   Sampling method when reducing the texture
    The following values are available
    igeCore.SAMPLERSTATE_LINEAR
    igeCore.SAMPLERSTATE_NEAREST
    igeCore.SAMPLERSTATE_NEAREST_MIPMAP_NEAREST
    igeCore.SAMPLERSTATE_LINEAR_MIPMAP_NEAREST
    igeCore.SAMPLERSTATE_NEAREST_MIPMAP_LINEAR
    igeCore.SAMPLERSTATE_LINEAR_MIPMAP_LINEAR
mipfilter : int  (optional)
    Not used now.
def setMaterialRenderState(...)

Set render state for material

editableFigure.setMaterialRenderState(materialName, paramName, value1, value2, value3, value4)

Parameters

materialName : string
    Name of the material to which you want to add RenderState
paramName : string
    Render state name
    The following names are currently available
    alpha_func
    alpha_test_enable
    blend_func
    blend_equation
    blend_enable
    cull_face
    cull_face_enable
    depth_func
    depth_mask
    depth_test_enable
    polygon_offset
    polygon_offset_fill_enable
    color_mask
    stencil_func
    stencil_mask
    stencil_op
    stencil_test_enable
    scissor_test_enable
    scissor
value1 : float or int or bool
    Render state parameter
value2 : float or int or bool
    Render state parameter
value3 : float or int or bool
    Render state parameter
value4 : float or int or bool
    Render state parameter
def setMeshAlpha(...)

Set mesh alpha value.

if you set alpha valie is less than 1.0 mesh is going to transparent. you set alpha valie is 0, mesh rendaring is skipped.

figure.setMeshAlpha(meshName, alpha)

Parameters

    meshName : string (or int)
            string of mesh name or int of mesh index to set alpha value.
            alpha : float
            alpha value.
def setMeshPrimitiveType(...)

Set the primitive type of Mesh.

figure.setMeshPrimitiveType(meshName, mode)

Parameters

    meshName : string (or int)
            string of mesh name or int of mesh index to set value.
            type : int
            primitive type.
                    igeCore.GL_LINES
                    igeCore.GL_LINE_LOOP
                    igeCore.GL_LINE_STRIP
                    igeCore.GL_TRIANGLES
                    igeCore.GL_TRIANGLE_STRIP
                    igeCore.GL_TRIANGLE_FAN
                    igeCore.GL_QUADS
                    igeCore.GL_QUAD_STRIP
def setParentJoint(...)

Set the joint of another figure (or EditableFigure) as the parent joint.

figure.setParentJoint(figure, jointName)

Parameters

figure : figure
    Parent figure or EditableFigure
jointName : string
    Parent joint name
def setShaderGenerator(...)

Set shaderGenerator.

Set shaderGenerator to specified material and replace shader.

figure.setShaderGenerator(materialName, shaderGen)

Parameters

    materialName : string (or int)
            string of material name or int of material index.
            shaderGen : igeCore.shaderGenerator
            shaderGenerator object.
def setTime(...)

Specifies the animation time applied by connectAnimator

figure.setTime(time)

Parameters

time : float
    Specifies the animation time in seconds
def setTriangles(...)

Set traiangle index data to the mesh object

figure.setTriangles(meshName or index, data, offset)

Parameters

meshName : string
    Registered mesh name to which you want to add triangle index
index : string
    Registered mesh index to which you want to add triangle index
data : tuple or list
    Triangle index
offset : int (optional)
    Start triangle position to add
def setVertexElements(...)

Set vertex data to the mesh object

figure.setVertexElements(meshName or index, attributeType, data, offset)

This method can't add new attributes or vertices like editableFigure.

Parameters

meshName : string
    Registered mesh name to which you want to add vertex information
index : int
    Registered mesh index to which you want to add vertex information
attributeType : int
    Vertex element type
    One of the following values

    igeCore.ATTRIBUTE_ID_POSITION
    igeCore.ATTRIBUTE_ID_NORMAL
    igeCore.ATTRIBUTE_ID_TANGENT
    igeCore.ATTRIBUTE_ID_BINORMAL
    igeCore.ATTRIBUTE_ID_UV0
    igeCore.ATTRIBUTE_ID_UV1
    igeCore.ATTRIBUTE_ID_UV2
    igeCore.ATTRIBUTE_ID_UV3
    igeCore.ATTRIBUTE_ID_COLOR
    igeCore.ATTRIBUTE_ID_BLENDINDICES
    igeCore.ATTRIBUTE_ID_BLENDWEIGHT
    igeCore.ATTRIBUTE_ID_PSIZE
data : tuple or list
    Vertex elements
offset : int (optional)
    Start position to add vertex elements

Examples

efig.addMesh('meshA', 'materialA');
points = ((-1, 1, 0), (1, 1, 0), (-1, -1, 0), (1, -1, 0))
efig.setVertexElements('meshA', igeCore.ATTRIBUTE_ID_POSITION, points
def step(...)

Advances the animation applied with connectAnimator() by elapsedTime

figure.step(elapsedTime)

Parameters

elapsedTime : float
    Specifies the delta animation time in seconds
    If omitted, it will be the value of igeCore.elapsedTime()
class haptic (...)

Methods

def effectPlay(...)

haptic effect play

haptic.effectPlay(strength, length)

Parameters

strength : float
    strength of the rumble to play as a 0-1 float value
length : unsigned int
    ength of the rumble to play in milliseconds
def init(...)

init the haptic system

haptic.init()

def play(...)

Allow you to trigger vibrations and haptic feedbacks on both iOS and Android

haptic.effectPlay(type, repeat)

Parameters

type : int
   type specify the following values 
   pyxie.HAPTIC_SELECTION
   pyxie.HAPTIC_SUCCESS
   pyxie.HAPTIC_WARNING
   pyxie.HAPTIC_FAILURE
   pyxie.HAPTIC_LIGHT_IMPACT
   pyxie.HAPTIC_MEDIUM_IMPACT
   pyxie.HAPTIC_HEAVY_IMPACT
repeat : bool
    pass the index into the timings array at which to start the repetition, or -1 to disable repeating.
def release(...)

release the profiler system

haptic.release()

def rumblePlay(...)

haptic rumble play

haptic.rumblePlay(strength, length)

Parameters

strength : float
    strength of the rumble to play as a 0-1 float value
length : unsigned int
    ength of the rumble to play in milliseconds
def stop(...)

haptic stop

haptic.stop()

class particle (...)

Instance variables

var position

3D position of object

type : pyvmath.vec3 : (x,y,z)

var rotation

3D rotation of object

type : pyvmath.quat : (x,y,z,w)

var scale

3D scale of object

type : pyvmath.vec3 : (x,y,z)

Methods

def SetCamera(...)

Set the value of joint in world coordinate system

figure.setJoint(jointName or jointIndex, position, rotation, scale, space)

Parameters

jointName : string
    The name of the joint you want to get
jointIndex : int
    The index of the joint you want to get
position : igeVmath.Vec3 (optional)
    position of joint
rotation : igeVmath.Quat (optional)
    rotation of joint
scale : igeVmath.Vec3 (optional)
    scale of joint
    space : int (optional)  
            Coordinate system of the value to get
           (core.WorldSpace or core.LocalSpace)
def SetPPM(...)

Set the value of joint in world coordinate system

figure.setJoint(jointName or jointIndex, position, rotation, scale, space)

Parameters

jointName : string
    The name of the joint you want to get
jointIndex : int
    The index of the joint you want to get
position : igeVmath.Vec3 (optional)
    position of joint
rotation : igeVmath.Quat (optional)
    rotation of joint
scale : igeVmath.Vec3 (optional)
    scale of joint
    space : int (optional)  
            Coordinate system of the value to get
           (core.WorldSpace or core.LocalSpace)
def UpdateParticles(...)

Set the value of joint in world coordinate system

figure.setJoint(jointName or jointIndex, position, rotation, scale, space)

Parameters

jointName : string
    The name of the joint you want to get
jointIndex : int
    The index of the joint you want to get
position : igeVmath.Vec3 (optional)
    position of joint
rotation : igeVmath.Quat (optional)
    rotation of joint
scale : igeVmath.Vec3 (optional)
    scale of joint
    space : int (optional)  
            Coordinate system of the value to get
           (core.WorldSpace or core.LocalSpace)
def connectAnimator(...)

Apply animation data to the model.

figure.connectAnimator(slot, anime)

Parameters

slot : int
    There are 6 slots, and the final motion is output by the following calculation.

    A0* A1 + B0 * B1 + C0 * C1
   (* :weighted average , + : Additive synthesis)

   Slots specify the following values 
   igeCore.ANIMETION_SLOT_A0
   igeCore.ANIMETION_SLOT_A1
   igeCore.ANIMETION_SLOT_B0
   igeCore.ANIMETION_SLOT_B1
   igeCore.ANIMETION_SLOT_C0
   igeCore.ANIMETION_SLOT_C1

anime : string or igeCore.animator
    Animation name or igeCore.animator object

    File name of the underlying motion data

Examples

figure.connectAnimator(igeCore.ANIMETION_SLOT_A0, 'animationA') figure.connectAnimator(igeCore.ANIMETION_SLOT_A1, 'animationB') figure.setBlendingWeight(igeCore.ANIMETION_PART_A), 0.5)

It becomes the middle posture of animationA and animationB

def getBlendingWeight(...)

Get weight of weighted average of animation part

weight = figure.getBlendingWeight(part)

Parameters

part : int
    Animation part for which you want to obtain a weighted average

             Specify the following value
    igeCore.ANIMETION_PART_A
    igeCore.ANIMETION_PART_B
    igeCore.ANIMETION_PART_C

Returns

weight
    Weighted average value specified for each part
def getCamera(...)

Get camera information included in the scene

camera = figure.getCamera(cameraName)

Parameters

cameraName : string
    Name of camea node
    If omitted, the first camera found is returned.
    It is not necessary to specify a name if the scene contains only one camera

Returns

camera : igeCore.camera
    camera object
def getEnvironment(...)

Get environmental information included in the scene Environmental information is information such as lightingand fog.

env = figure.getEnvironment()

Returns

env : igeCore.environment
    enbironment object

environment object

Specification of environment is still under construction
 
def getJoint(...)

Get the value of joint after animation calculation in world coordinate system

position, rotation, scale = figure.getJoint(jointName or jointIndex, space)

Parameters

jointName : string
    The name of the joint you want to get
jointIndex : int
    The index of the joint you want to get
    space : int (optional)  
            Coordinate system of the value to get
           (core.WorldSpace or core.LocalSpace)
    Returns

position : igeVmath.Vec3
    position of joint
rotation : igeVmath.Quat
    rotation of joint
scale : igeVmath.Vec3
    scale of joint
def setBlendingWeight(...)

Specifies the weight of the weighted average of animation parts

figure.setBlendingWeight(part, weight)

Parameters

part : int
    Animation part for which you want to specify weights

             Specify the following value
    igeCore.ANIMETION_PART_A
    igeCore.ANIMETION_PART_B
    igeCore.ANIMETION_PART_C

weight : float
    Specify the weight of weighted average in the range of 0.0 to 1.0
def setJoint(...)

Set the value of joint in world coordinate system

figure.setJoint(jointName or jointIndex, position, rotation, scale, space)

Parameters

jointName : string
    The name of the joint you want to get
jointIndex : int
    The index of the joint you want to get
position : igeVmath.Vec3 (optional)
    position of joint
rotation : igeVmath.Quat (optional)
    rotation of joint
scale : igeVmath.Vec3 (optional)
    scale of joint
    space : int (optional)  
            Coordinate system of the value to get
           (core.WorldSpace or core.LocalSpace)
def setTime(...)

Specifies the animation time applied by connectAnimator

figure.setTime(time)

Parameters

time : float
    Specifies the animation time in seconds
def step(...)

Advances the animation applied with connectAnimator() by elapsedTime

figure.step(elapsedTime)

Parameters

elapsedTime : float
    Specifies the delta animation time in seconds
    If omitted, it will be the value of igeCore.elapsedTime()
class profiler (...)
class shaderGenerator (...)

shaderGenerator is abstracted to be compatible with multiple platforms by replacing shader code with simple procedure You can see the current shader code with print (shaderGeneragtor)

Instance variables

var globalAlphaRef

Depth Shadow coefficient. default value is 0.005

type : float
read / write

var globalMipBias

Texture mip bias. default value is -1.5

type : float
read / write

var globalShadowBias

Depth Shadow coefficient. default value is 0.005

type : float
read / write

Methods

def dicardViewProj(...)
def discardColorMapRGB(...)

Discard the RGB channel of the color map. Used in combination with GL_ALPHA format textures.

shaderGenerater.discardColorMapRGB(dicardRGB)

Parameters

dicardRGB : bool
def setAlphaMap(...)

set diffuce alpha map channel.

shaderGenerater.setAlphaMap(channel)

Parameters

channel : int
            igeCore.DIFFUSE_ALPHA
            igeCore.DIFFUSE_RED
            igeCore.NORMAL_ALPHA
            igeCore.NORMAL_RED
            igeCore.LIGHT_ALPHA
            igeCore.LIGHT_RED
            igeCore.OVERLAY_DIFFUSE_ALPHA
            igeCore.OVERLAY_DIFFUSE_RED
            igeCore.OVERLAY_NORMAL_ALPHA
            igeCore.OVERLAY_NORMAL_RED
def setAmbientOcclusion(...)

Enable or disable ambient occlusion mapping.

shaderGenerater.setAmbientOcclusion(textureMapChannel)

Parameters

textureMapChannel : int
def setAmbientType(...)

Specifies the ambient light type

shaderGenerater.setAmbientType(type)

Parameters

type : int 
    Ambient light type
    igeCore.AMBIENT_TYPE_NONE
    igeCore.AMBIENT_TYPE_AMBIENT
    igeCore.AMBIENT_TYPE_HEMISPHERE
def setBoneCondition(...)

Specifys the number of bone palette and number of bone influencen

shaderGenerater.setBoneCondition(numBoneInfluence, numBonePalette)

Parameters

numBoneInfluence : int
    Number of bones that one vertex refers to simultaneously
numBonePalette : int
    Number of bones to put in the bones palette
def setCalcBinormalInShader(...)

Whether to calculate Binormal values used in normal mapping calculations in the shader

shaderGenerater.setCalcBinormalInShader(calcBinormal)

Parameters

calcBinormal : bool
def setClutLamp(...)

Enable or disable color look up table lighting Useful for expressing cartoon lighting

shaderGenerater.setClutLamp(enableCLUT)

Parameters

enableCLUT : bool
def setColorTexture(...)

Whether to enable color texture

shaderGenerater.setColorTexture(enableTexture)

Parameters

enableTexture : bool
def setColorTextureUVSet(...)

Specifies the UV channel of the color map texture RGB and A can be specified separately Supports 3 channels of UV0, UV1and UV2

shaderGenerater.setColorTextureUVSet(rgbChannel, aChannel)

Parameters

rgbChannel : int
    uv channel no (0, 1, 2)
aChannel : int
    uv channel no (0, 1, 2)
def setDistortion(...)

Enable / Disable distortion shader.

shaderGenerater.setDistortion(enable)

Parameters

enable : bool
def setLightTexture(...)

Whether to enable light texture

shaderGenerater.setLightTexture(enableTexture)

Parameters

enableTexture : bool
def setLightTextureUVSet(...)

Specifies the UV channel of the light map texture RGBand A can be specified separately Supports 3 channels of UV0, UV1and UV2

shaderGenerater.setLightTextureUVSet(rgbChannel, aChannel)

Parameters

rgbChannel : int
    uv channel no (0, 1, 2)
aChannel : int
    uv channel no (0, 1, 2)
def setNormalTexture(...)

Whether to enable normal texture

shaderGenerater.setNormalTexture(enableTexture)

Parameters

enableTexture : bool
def setNormalTextureUVSet(...)

Specifies the UV channel of the normal map texture RGBand A can be specified separately Supports 3 channels of UV0, UV1and UV2

shaderGenerater.setNormalTextureUVSet(rgbChannel, aChannel)

Parameters

rgbChannel : int
    uv channel no (0, 1, 2)
aChannel : int
    uv channel no (0, 1, 2)
def setNumDirLamp(...)

Specifies the number of directional light sources affected. You can specify up to 3

shaderGenerater.setNumDirLamp(numLamp)

Parameters

numLamp : int
    Number of directional light (0, 1, 2, 3)
def setNumPointLamp(...)

Specifies the number of point light sources affected. You can specify up to 7

shaderGenerater.setNumPointLamp(numLamp)

Parameters

numLamp : int
    Number of point light (0 - 7)
def setNumSpotLamp(...)

Specifies the number of point light sources affected. You can specify up to 7

shaderGenerater.setNumPointLamp(numLamp)

Parameters

numLamp : int
    Number of point light (0 - 7)
def setOverlayAlphaMap(...)

set overay diffuce alpha map channel.

shaderGenerater.setOverlayAlphaMap(channel)

Parameters

channel : int
            igeCore.DIFFUSE_ALPHA
            igeCore.DIFFUSE_RED
            igeCore.NORMAL_ALPHA
            igeCore.NORMAL_RED
            igeCore.LIGHT_ALPHA
            igeCore.LIGHT_RED
            igeCore.OVERLAY_DIFFUSE_ALPHA
            igeCore.OVERLAY_DIFFUSE_RED
            igeCore.OVERLAY_NORMAL_ALPHA
            igeCore.OVERLAY_NORMAL_RED
def setOverlayColorTexture(...)

Whether to enable overlay color texture

shaderGenerater.setOverlayColorTexture(enableTexture)

Parameters

enableTexture : bool
def setOverlayColorTextureUVSet(...)

Specifies the UV channel of the overlay color map texture RGBand A can be specified separately Supports 3 channels of UV0, UV1and UV2

shaderGenerater.setOverlayColorTextureUVSet(rgbChannel, aChannel)

Parameters

rgbChannel : int
    uv channel no (0, 1, 2)
aChannel : int
    uv channel no (0, 1, 2)
def setOverlayNormalColorTextureUVSet(...)

Specifies the UV channel of the overlay normal map texture RGBand A can be specified separately Supports 3 channels of UV0, UV1and UV2

shaderGenerater.setOverlayNormalColorTextureUVSet(rgbChannel, aChannel)

Parameters

rgbChannel : int
    uv channel no (0, 1, 2)
aChannel : int
    uv channel no (0, 1, 2)
def setOverlayNormalTexture(...)

Whether to enable overlay normal texture

shaderGenerater.setOverlayNormalTexture(enableTexture)

Parameters

enableTexture : bool
def setOverlaySpecularTexture(...)

Whether to enable overlay specular texture

shaderGenerater.setOverlaySpecularTexture(enableSpecular)

Parameters

enableSpecular : bool
def setOverlayVertexAlpha(...)

Whether to refer to the alpha channel of the vertex color when calculating overlay map transparency

shaderGenerater.setOverlayVertexAlpha(enableVertexAlpha)

Parameters

enableVertexAlpha : bool
def setProjectionMapping(...)

Enable / Disable projection mapping shader.

shaderGenerater.setProjectionMapping(channel, enable)

Parameters

channel : int
            UV channel no (0 - 2)
enable : bool
def setShadow(...)

Enable / disable shadow rendering

shaderGenerater.setReceiveShadow(make, receive, depth)

Parameters

    make : bool
            When enabled, it produces shadows.
    receive : bool
            When enabled, it receive shadows.
    depth : bool
            When enabled, the self - shadowing algorithm with depth buffer is selected.
            depth must be enabled for make and receive to be active at the same time.
            If depth is disabled, you get a simpler cast shadow instead of a Depth shadow, 
            Then you cannot enable make and receive at the same time.
            Cast shadows have the advantages of light processing and clear shadow drawing.
            Depth shadows and cast shadows cannot be used at the same time in the same scene.
            You need to unify to either one.
def setSpecular(...)

Enable or disable specular reflection

shaderGenerater.setSpecular(enableSpecular, textureMapChannel)

Parameters

enableSpecular : bool
    Enable or disable specular reflection
textureMapChannel : int
    Specify Specular strength map
    The following values can be selected
    igeCore.MAPCHANNEL_NONE
    igeCore.MAPCHANNEL_COLOR_RED
    igeCore.MAPCHANNEL_COLOR_ALPHA
    igeCore.MAPCHANNEL_NORMAL_RED
    igeCore.MAPCHANNEL_NORMAL_ALPHA
    igeCore.MAPCHANNEL_VERTEX_COLOR_RED
    igeCore.MAPCHANNEL_VERTEX_COLOR_ALPHA
def setUVOffset(...)

Enable / Disable UV offset shader.

shaderGenerater.setUVOffset(channel, enable)

Parameters

channel : int
            UV channel no (0 - 2)
enable : bool
def setUVScroll(...)

Enable / Disable UV scroll shader.

shaderGenerater.setUVScroll(channel, enable)

Parameters

channel : int
            UV channel no (0 - 2)
enable : bool
def setUnifiedColor(...)
def setVertexAlpha(...)

Whether to references the vertex color alpha channel as a transparent source

shaderGenerater.setVertexAlpha(enableVertexAlpha)

Parameters

enableVertexAlpha : bool
def setVertexColor(...)

Enable or disable vertex color

shaderGenerater.setVertexColor(enableVertexColor)

Parameters

enableVertexColor : bool
class showcase (...)

showcase is where you put the objects you want to render. You can add figure, editableFigure, environment, camera.

case = igeCore.shocase()

Methods

def add(...)

Add object to showcase

showcase.add(object, depth)

Parameters

object : igeCore.figure, igeCore.editableFigure, igeCore.environment
    Object to be added to showcase
    depth : float (optional)
            Higher values render later.
            If the values are the same, they will be rendered in the order in which they were added.
            If omitted, it is assumed to be 0
def addShadowBuffer(...)

Sort Figures registered in showcase by Z value in view space.

showcase.zsort(camera)

Parameters

    camera : igeCore.camera
            Camera to render
    depth : float
def changeDepth(...)

Change depth of object in showcase

showcase.changeDepth(object, depth)

Parameters

    object : igeCore.figure, igeCore.editableFigure, igeCore.environment
            Object to be added to showcase
    depth : float
            Higher values render later.
            If the values are the same, they will be rendered in the order in which they were added.
def clear(...)

Remove all object from showcase

showcase.clear()

def find(...)

Find object

rv = showcase.find(object)

Parameters

object : igeCore.figure, igeCore.editableFigure, igeCore.environment
    Object to find

Returns

    rv : bool
            True if exist object in shocase
def remove(...)

Remove object from showcase

showcase.add(object)

Parameters

object : igeCore.figure, igeCore.editableFigure, igeCore.environment
    Object to be added to showcase
def zsort(...)

Sort Figures registered in showcase by Z value in view space.

showcase.zsort(camera)

Parameters

    camera : igeCore.camera
            Camera to render
    depth : float
class texture (...)

Textures are RGBA bitmap image objects

Formula

tex = igeCore.texture(name)
    Create texture from image file.
tex = igeCore.texture(name,width,height,format,depth,stencil,pixel)
    Create texture from parameters.

Parameters

name : string
    If there are no parameters other than name, 
    name is assumed to be the image file name.
    When combined with other parameters such as width and height, 
    name is considered a unique name for the texture.
width : int
    width of texture pixels.
height : int
    height of texture pixels.
format : int
    enable texture format
    GL_RED : 1 channel format (n,0,0,0)
    GL_RGB : 3 channel format (n,m,l,0)
    GL_RGBA : 4 channel format (n,m,l,o)
depth : bool
    At the same time, a depth buffer is generated.
    This option is for use as a render target.
stencil : bool
    At the same time, a stencil buffer is generated.
    This option is for use as a render target.
pixel : numpy.ndarray or byte object
    array for bitmap image.

Instance variables

var bitSize

Texture bit size

type : int
read only

var format

Texture format

type : int
read only

var height

Texture height

type : int
read only

var id

The texture handle id

type : int
read only

var numMips

Number of texture mipmaps

type : int
read only

var width

Texture width

type : int
read only

Methods

def captureScreenshot(...)

capture the screen

texture.captureScreenshot(name, x, y, w, h, callback)

Parameters

name : string (optional)
    capture name
     x : int
            x offset
     y : int
            y offset
     w : int
            width
     h : int
            height
     callback : function
            call the callback when the capturing is finished
def clear(...)

Clear the texture with the specified color

texture.clear(r, g, b, a)

Parameters

r, g, b, a : float
    clear color(0-1).
    size of render text
def getData(...)

Get the render target data

texture.getData(x,y,w,h)

Parameters

x,y,w,h : int (optional)
    default color is (0, 0, -1, -1)

Returns

result : list(unsigned char)
def getResourceName(...)

Get the resource name

texture.getResourceName()

Returns

result : string
def saveToGallery(...)

save image captured to gallery

texture.saveToGallery()

def setCheckeredImage(...)

Set checkerd image to texture object

texture.setCheckeredImage(r, g, b, a)

Parameters

r,g,b,a : int (optional)
    checker color (0 - 1)
    default color is red
def setImage(...)

Set byte image to texture object

texture.setImage(image, x, y, width,height)

Parameters

image : Bytes or numpy.ndarray
    array of rgb or rgba image
x : int (optional)
    x offset of destination
y : int (optional)
    y offset of destination
width : int (optional)
    copy image width
height : int (optional)
    copy image height
def setText(...)

Render text to texture object

texture.setText(word, fontpath, size)

Parameters

    word : string
            word to render.
    fontpath : string
            font file path.
    size : int
            size of render text     startX : int
            draw text X offset
    startY : int
            draw text Y offset
    clear : bool
            clear texture befor draw text