예제 #1
0
파일: main.py 프로젝트: 18jreid/MyProjects
    # WEST FACE
    Triangle(Vec3d(0, 0, 1), Vec3d(0, 1, 1), Vec3d(0, 1, 0)),
    Triangle(Vec3d(0, 0, 1), Vec3d(0, 1, 0), Vec3d(0, 0, 0)),

    # TOP FACE
    Triangle(Vec3d(0, 1, 0), Vec3d(0, 1, 1), Vec3d(1, 1, 1)),
    Triangle(Vec3d(0, 1, 0), Vec3d(1, 1, 1), Vec3d(1, 1, 0)),

    # BOTTOM FACE
    Triangle(Vec3d(1, 0, 1), Vec3d(0, 0, 1), Vec3d(0, 0, 0)),
    Triangle(Vec3d(1, 0, 1), Vec3d(0, 0, 0), Vec3d(1, 0, 0))
]

myPlane = Mesh()
myPlane.loadFromObjectFile("MyPlane.obj")
meshCube = Mesh(cubeTriangles)
meshCone = Mesh()
meshCone.loadFromObjectFile("cone.obj")
meshSphere = Mesh()
meshSphere.loadFromObjectFile("sphere.obj")
fTheta: float = 0.0
userPositionX: float = 0
userPositionY: float = 0
userPositionZ: float = 64
vCamera: Vec3d = Vec3d(userPositionX, userPositionY, userPositionZ)

# Projection Matrix Constants
fNear: float = 0.1
fFar: float = 1000.0
fFov: float = 90