Package com.ijurnove.cpu3d


package com.ijurnove.cpu3d
To generate a 3D render, you must have a Scene containing a set of Shape3ds, a set of Lights, and a Camera.

This package comes with a built-in .obj file reader to generate Meshes and a image reader to generate textures, both of which are required for a Shape3d. Materials are required as well to define how the Shape3d interacts with light. A few example Materials have already been made, but more can be created easily.

In addition to a Shape3d[], a Light[], and a Camera, a SceneInitFlags object must be created to define things such as shadow resolution and image size. After getting all of these and constructing a Scene, it can be rendered with the .render() method.

  • Class
    Description
    Camera objects define a viewpoint from which a Scene can be rendered.
    DirectionalLight is a Light with a direction but no specific position.
     
    Objects that extend the Light class are used by Scene to calculate lighting.
     
    The Material class defines how light interacts with a surface.
    A Matrix stores a two dimensional array of doubles.
    A Mesh consists of a set of Triangles.
    ObjReader contains one method, read(), for converting an .obj file to a Mesh.
    A PhongComponents object contains information about lighting, for the Blinn-Phong lighting model.
    A Point3d is a specific point in 3D space.
    PointLight extends the abstract class Light.
    This interface allows objects in 3D space to be rotated.
    This interface allows objects in 3D space to be scaled.
    A Scene consists of a set of Shape3ds, a set of Lights, and a Camera.
    SceneFlag values are used as keys in SceneFlags.
    SceneFlags is used in a Scene to toggle certain features or change specific values.
    SceneInitFlag values are used as keys in SceneInitFlags.
    SceneInitFlags is used in a Scene to set certain values at initialization.
    Shape3ds represent a three-dimensional shape with a texture and a material.
    ShapeFlags are used to toggle specific features in a Shape3d.
    Textures contains one method for reading image files, Textures.read().
    This interface allows objects in 3D space to be translated.
    A Triangle holds three Point3ds, three point normals, three UV coordinates, and one surface normal.
    UV coordinates represent a point on a texture.
    A Vector3d represents a direction in 3D space.