Logo Search packages:      
Sourcecode: java3ds-fileloader version File versions  Download package

void com::microcrowd::loader::java3d::max3ds::ChunkMap::initializeDataMap (  )  [inline, private]

looks up the chunk corresponding to chunkID in the chopper's cache. If its not there look it up from the parent chunk provided.

Parameters:
chunkID the id of the chunk to lookup
Returns:
the chunk for chunkID public synchronized Chunk getChunk(Chunk parentChunk, Integer chunkID) { Chunk chunk = (Chunk)get(chunkID); if(chunk == null && parentChunk != null) { chunk = (Chunk)(parentChunk.getChunkMap().get(chunkID)); //look up chunk from its parent. put(chunkID, chunk); } return chunk; } Called when debugging is turned on. The keys are cast to short so that they are improperly signed since java will be reading improperly signed ids out of the file.

Definition at line 190 of file ChunkMap.java.

References com::microcrowd::loader::java3d::max3ds::chunks::Chunk::addSubChunk(), AMBIENT_COLOR, CAMERA, COORDINATE_AXES, DIFFUSE_COLOR, FACES_DESCRIPTION, FACES_MATERIAL, FRAMES_CHUNK, HIERARCHY_INFO, LIGHT, MATERIAL_NAME, MESH, MESH_INFO, NAME_AND_FLAGS, PIVOT, POSITION, ROTATION, SCALE_TRACK, SHININESS, SMOOTH, SPECULAR_COLOR, TEXTURE, TEXTURE_COORDINATES, TEXTURE_NAME, TRANSPARENCY, TWO_SIDED, and VERTEX_LIST.

Referenced by ChunkMap().

    {
        Chunk keyFramerChunk         = new Chunk("KeyFramerChunk");
        Chunk editorChunk            = new Chunk("EditorChunk");
        Chunk triangularMeshChunk    = new Chunk("TriangularMeshChunk");

        Chunk facesDescriptionChunk  = new FacesDescriptionChunk();
        Chunk framesDescriptionChunk = new FramesDescriptionChunk();
        Chunk textureChunk           = new TextureChunk();
        Chunk lightChunk             = new LightChunk();
        Chunk namedObjectChunk       = new NamedObjectChunk();
        Chunk materialChunk          = new MaterialChunk();
        Chunk keyFramerInfoChunk     = new KeyFramerInfoChunk();
        Chunk spotLightChunk         = new SpotLightChunk();
        Chunk floatChunk             = new FloatChunk();
        Chunk framesChunk            = new FramesChunk();
        Chunk pivotChunk             = new PivotChunk();
        Chunk positionChunk          = new PositionChunk();
        Chunk rotationChunk          = new RotationChunk();
        Chunk scaleChunk             = new ScaleChunk();
        Chunk hierarchyInfoChunk     = new HierarchyInfoChunk();
        Chunk boundingBoxChunk       = new BoundingBoxChunk();
        Chunk stringChunk            = new StringChunk();
        Chunk globalColorChunk       = new GlobalColorChunk();
        Chunk booleanChunk           = new BooleanChunk();
        Chunk percentageChunk        = new PercentageChunk();
        Chunk cameraChunk            = new CameraChunk();
        Chunk colorChunk             = new ColorChunk();
        Chunk vertex3ListChunk       = new Vertex3ListChunk();
        Chunk vertex2ListChunk       = new Vertex2ListChunk();
        Chunk axisChunk              = new AxisChunk();
        Chunk facesMaterialChunk     = new FacesMaterialChunk();
        Chunk smoothingChunk         = new SmoothingChunk();


        //mainChunk.addSubChunk(VERSION, stringChunk);
        mainChunk.addSubChunk(EDITOR, editorChunk);
        mainChunk.addSubChunk(KEYFRAMER, keyFramerChunk);

        editorChunk.addSubChunk(MATERIAL, materialChunk);
        editorChunk.addSubChunk(SCALE, floatChunk);
        editorChunk.addSubChunk(NAMED_OBJECT, namedObjectChunk);

        keyFramerChunk.addSubChunk(FRAMES_CHUNK, framesChunk);
        keyFramerChunk.addSubChunk(MESH_INFO, keyFramerInfoChunk);
        //keyFramerChunk.addSubChunk(AMBIENT_LIGHT_INFO, keyFramerInfoChunk);
        //keyFramerChunk.addSubChunk(CAMERA_INFO, keyFramerInfoChunk);
        //keyFramerChunk.addSubChunk(CAMERA_TARGET_INFO, keyFramerInfoChunk);
        //keyFramerChunk.addSubChunk(OMNI_LIGHT_INFO, keyFramerInfoChunk);
        //keyFramerChunk.addSubChunk(SPOT_LIGHT_TARGET_INFO, keyFramerInfoChunk);
        //keyFramerChunk.addSubChunk(SPOT_LIGHT_INFO, keyFramerInfoChunk);

        keyFramerInfoChunk.addSubChunk(NAME_AND_FLAGS, framesDescriptionChunk);
        keyFramerInfoChunk.addSubChunk(PIVOT, pivotChunk);
        keyFramerInfoChunk.addSubChunk(POSITION, positionChunk);
        keyFramerInfoChunk.addSubChunk(ROTATION, rotationChunk);
        keyFramerInfoChunk.addSubChunk(SCALE_TRACK, scaleChunk);
        keyFramerInfoChunk.addSubChunk(HIERARCHY_INFO, hierarchyInfoChunk);
        keyFramerInfoChunk.addSubChunk(BOUNDING_BOX, boundingBoxChunk);

        //spotLightChunk.addSubChunk(LIGHT_OFF, booleanChunk);
        //spotLightChunk.addSubChunk(RAYTRACE, booleanChunk);
        //spotLightChunk.addSubChunk(SHADOWED, booleanChunk);
        //spotLightChunk.addSubChunk(SHOW_CONE, booleanChunk);
        //spotLightChunk.addSubChunk(RECTANGULAR, booleanChunk);
        //spotLightChunk.addSubChunk(SHADOW_MAP, booleanChunk);
        //spotLightChunk.addSubChunk(OVERSHOOT, booleanChunk);
        //spotLightChunk.addSubChunk(SPOT_MAP, booleanChunk);
        //spotLightChunk.addSubChunk(SPOT_ROLL, booleanChunk);
        //spotLightChunk.addSubChunk(RAY_TRACE_BIAS, booleanChunk);

        materialChunk.addSubChunk(MATERIAL_NAME, stringChunk);

        materialChunk.addSubChunk(AMBIENT_COLOR, globalColorChunk);
        materialChunk.addSubChunk(DIFFUSE_COLOR, globalColorChunk);
        materialChunk.addSubChunk(SPECULAR_COLOR, globalColorChunk);
        materialChunk.addSubChunk(TEXTURE, textureChunk);

        materialChunk.addSubChunk(TWO_SIDED, booleanChunk);

        materialChunk.addSubChunk(SHININESS, percentageChunk);
        materialChunk.addSubChunk(TRANSPARENCY, percentageChunk);

        namedObjectChunk.addSubChunk(MESH, triangularMeshChunk);
        namedObjectChunk.addSubChunk(CAMERA, cameraChunk);
        namedObjectChunk.addSubChunk(LIGHT, lightChunk);

        lightChunk.addSubChunk(RANGE_START, floatChunk);
        lightChunk.addSubChunk(COLOR, colorChunk);
        lightChunk.addSubChunk(RANGE_END, floatChunk);
        lightChunk.addSubChunk(MULTIPLIER, floatChunk);
        lightChunk.addSubChunk(SPOTLIGHT, spotLightChunk);


        textureChunk.addSubChunk(TEXTURE_NAME, stringChunk);

        triangularMeshChunk.addSubChunk(VERTEX_LIST, vertex3ListChunk);
        triangularMeshChunk.addSubChunk(TEXTURE_COORDINATES, vertex2ListChunk);
        triangularMeshChunk.addSubChunk(FACES_DESCRIPTION, facesDescriptionChunk);
        triangularMeshChunk.addSubChunk(COORDINATE_AXES, axisChunk);

        facesDescriptionChunk.addSubChunk(FACES_MATERIAL, facesMaterialChunk);
        facesDescriptionChunk.addSubChunk(SMOOTH, smoothingChunk);

        /*
           put(new Integer((short)0x0010), "Rgb (float)");
           put(new Integer((short)0x0011), "Rgb (byte)");
           put(new Integer((short)0x0012), "Rgb (byte) gamma corrected");
           put(new Integer((short)0x0013), "Rgb (float) gamma corrected");
           put(new Integer((short)0x0030), "percent (int)");
           put(new Integer((short)0x0031), "percent (float)");
           put(new Integer((short)0x0002), "3DS-Version");
           put(new Integer((short)0x3D3D), "3D editor chunk");
           put(new Integer((short)0x0100), "One unit");
           put(new Integer((short)0x1100), "Background bitmap");
           put(new Integer((short)0x1101), "Use background bitmap");
           put(new Integer((short)0x1200), "Background color");
           put(new Integer((short)0x1201), "Use background color");
           put(new Integer((short)0x1300), "Gradient colors");
           put(new Integer((short)0x1301), "Use gradient");
           put(new Integer((short)0x1400), "Shadow map bias");
           put(new Integer((short)0x1420), "Shadow map size");
           put(new Integer((short)0x1450), "Shadow map sample range");
           put(new Integer((short)0x1460), "Raytrace bias");
           put(new Integer((short)0x1470), "Raytrace on");
           put(new Integer((short)0x2100), "Ambient color");
           put(new Integer((short)0x2200), "Fog");
           put(new Integer((short)0x2210), "fog background");
           put(new Integer((short)0x2201), "Use fog");
           put(new Integer((short)0x2210), "Fog background");
           put(new Integer((short)0x2300), "Distance queue");
           put(new Integer((short)0x2310), "Dim background");
           put(new Integer((short)0x2301), "Use distance queue");
           put(new Integer((short)0x2302), "Layered fog options");
           put(new Integer((short)0x2303), "Use layered fog");
           put(new Integer((short)0x3D3E), "Mesh version");
           put(new Integer((short)0x4000), "Object block");
           put(new Integer((short)0x4010), "Object hidden");
           put(new Integer((short)0x4012), "Object doesn't cast");
           put(new Integer((short)0x4013), "Matte object");
           put(new Integer((short)0x4015), "External process on");
           put(new Integer((short)0x4017), "Object doesn't receive shadows");
           put(new Integer((short)0x4100), "Triangular mesh");
           put(new Integer((short)0x4110), "Vertices list");
           put(new Integer((short)0x4120), "Faces description");
           put(new Integer((short)0x4130), "Faces material list");
           put(new Integer((short)0x4140), "Mapping coordinates list");
           put(new Integer((short)0x4150), "Smoothing group list");
           put(new Integer((short)0x4160), "Local coordinate system");
           put(new Integer((short)0x4165), "Object color in editor");
           put(new Integer((short)0x4181), "External process name");
           put(new Integer((short)0x4182), "External process parameters");
           put(new Integer((short)0x4600), "Light");
           put(new Integer((short)0x4610), "Spotlight");
           put(new Integer((short)0x4627), "Spot raytrace");
           put(new Integer((short)0x4630), "Light shadowed");
           put(new Integer((short)0x4641), "Spot shadow map");
           put(new Integer((short)0x4650), "Spot show cone");
           put(new Integer((short)0x4651), "Spot is rectangular");
           put(new Integer((short)0x4652), "Spot overshoot");
           put(new Integer((short)0x4653), "Spot map");
           put(new Integer((short)0x4656), "Spot roll");
           put(new Integer((short)0x4658), "Spot ray trace bias");
           put(new Integer((short)0x4620), "Light off");
           put(new Integer((short)0x4625), "Attenuation on");
           put(new Integer((short)0x4659), "Range start");
           put(new Integer((short)0x465A), "Range end");
           put(new Integer((short)0x465B), "Multiplier");
           put(new Integer((short)0x4700), "Camera");
           put(new Integer((short)0x7001), "Window settings");
           put(new Integer((short)0x7011), "Window description #2 ...");
           put(new Integer((short)0x7012), "Window description #1 ...");
           put(new Integer((short)0x7020), "Mesh windows ...");
           put(new Integer((short)0xAFFF), "Material block");
           put(new Integer((short)0xA000), "Material name");
           put(new Integer((short)0xA010), "Ambient color");
           put(new Integer((short)0xA020), "Diffuse color");
           put(new Integer((short)0xA030), "Specular color");
           put(new Integer((short)0xA040), "Shininess percent");
           put(new Integer((short)0xA041), "Shininess strength percent");
           put(new Integer((short)0xA050), "Transparency percent");
           put(new Integer((short)0xA052), "Transparency falloff percent");
           put(new Integer((short)0xA053), "Reflection blur percent");
           put(new Integer((short)0xA081), "2 sided");
           put(new Integer((short)0xA083), "Add trans");
           put(new Integer((short)0xA084), "Self illum");
           put(new Integer((short)0xA085), "Wire frame on");
           put(new Integer((short)0xA087), "Wire thickness");
           put(new Integer((short)0xA088), "Face map");
           put(new Integer((short)0xA08A), "In tranc");
           put(new Integer((short)0xA08C), "Soften");
           put(new Integer((short)0xA08E), "Wire in units");
           put(new Integer((short)0xA100), "Render type");
           put(new Integer((short)0xA240), "Transparency falloff percent present");
           put(new Integer((short)0xA250), "Reflection blur percent present");
           put(new Integer((short)0xA252), "Bump map present (true percent)");
           put(new Integer((short)0xA200), "Texture map 1");
           put(new Integer((short)0xA33A), "Texture map 2");
           put(new Integer((short)0xA210), "Opacity map");
           put(new Integer((short)0xA230), "Bump map");
           put(new Integer((short)0xA33C), "Shininess map");
           put(new Integer((short)0xA204), "Specular map");
           put(new Integer((short)0xA33D), "Self illum. map");
           put(new Integer((short)0xA220), "Reflection map");
           put(new Integer((short)0xA33E), "Mask for texture map 1");
           put(new Integer((short)0xA340), "Mask for texture map 2");
           put(new Integer((short)0xA342), "Mask for opacity map");
           put(new Integer((short)0xA344), "Mask for bump map");
           put(new Integer((short)0xA346), "Mask for shininess map");
           put(new Integer((short)0xA348), "Mask for specular map");
           put(new Integer((short)0xA34A), "Mask for self illum. map");
           put(new Integer((short)0xA34C), "Mask for reflection map");
           put(new Integer((short)0xA300), "Mapping filename");
           put(new Integer((short)0xA351), "Mapping parameters");
           put(new Integer((short)0xA353), "Blur percent");
           put(new Integer((short)0xA354), "V scale");
           put(new Integer((short)0xA356), "U scale");
           put(new Integer((short)0xA358), "U offset");
           put(new Integer((short)0xA35A), "V offset");
           put(new Integer((short)0xA35C), "Rotation angle");
           put(new Integer((short)0xA360), "RGB Luma/Alpha tint 1");
           put(new Integer((short)0xA362), "RGB Luma/Alpha tint 2");
           put(new Integer((short)0xA364), "RGB tint R");
           put(new Integer((short)0xA366), "RGB tint G");
           put(new Integer((short)0xA368), "RGB tint B");
           put(new Integer((short)0xB000), "Key Framer");
           put(new Integer((short)0xB001), "Ambient light information block");
           put(new Integer((short)0xB002), "Mesh information block");
           put(new Integer((short)0xB003), "Camera information block");
           put(new Integer((short)0xB004), "Camera target information block");
           put(new Integer((short)0xB005), "Omni light information block");
           put(new Integer((short)0xB006), "Spot light target information block");
           put(new Integer((short)0xB007), "Spot light information block");
           put(new Integer((short)0xB008), "Frames (Start and End)");
           put(new Integer((short)0xB009), "Current Frame");
           put(new Integer((short)0xB00A), "Animation revision, filename and length");
           put(new Integer((short)0xB010), "Object name, parameters and hierarchy father");
           put(new Integer((short)0xB013), "Object pivot point");
           put(new Integer((short)0xB014), "Bounding Box");
           put(new Integer((short)0xB015), "Object morph angle");
           put(new Integer((short)0xB020), "Position track");
           put(new Integer((short)0xB021), "Rotation track");
           put(new Integer((short)0xB022), "Scale track");
           put(new Integer((short)0xB023), "FOV track");
           put(new Integer((short)0xB024), "Roll track");
           put(new Integer((short)0xB025), "Color track");
           put(new Integer((short)0xB026), "Morph track");
           put(new Integer((short)0xB027), "Hotspot track");
           put(new Integer((short)0xB028), "Falloff track");
           put(new Integer((short)0xB029), "Hide track");
           put(new Integer((short)0xB030), "Hierarchy position");
        */
    }


Generated by  Doxygen 1.6.0   Back to index