| |
---|
| | |
---|
| | import java.util.HashMap; |
---|
| | import java.util.HashSet; |
---|
| | |
---|
| | import org.ntlab.radishforandroidstudio.framework.model3D.BaseObject3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.model3D.Object3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.model3D.Position3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.model3D.Quaternion3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.model3D.Universe; |
---|
| | import org.ntlab.radishforandroidstudio.framework.physics.AngularVelocity3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.physics.Ground; |
---|
| | import org.ntlab.radishforandroidstudio.framework.physics.Velocity3D; |
---|
| | import org.ntlab.radishforandroidstudio.java3d.Appearance; |
---|
| | import org.ntlab.radishforandroidstudio.java3d.IndexedTriangleArray; |
---|
| | import org.ntlab.radishforandroidstudio.java3d.Material; |
---|
| | import org.ntlab.radishforandroidstudio.java3d.Point3d; |
---|
| | import org.ntlab.radishforandroidstudio.java3d.Vector3f; |
---|
| | |
---|
| | import cactusServer.entities.Entity; |
---|
| | import cactusServer.entities.MovableObject; |
---|
| | import cactusServer.entities.Area.Allowed; |
---|
| |
---|
| | } |
---|
| | |
---|
| | private void initUniverse() { |
---|
| | universe = new Universe(); |
---|
| | /* |
---|
| | // ステージの3Dデータを読み込み配置する |
---|
| | Object3D stageObj = StageModelManager.getInstance().getStage(stageID).createObject(); |
---|
| | stage = new Ground(stageObj); |
---|
| | universe.place(stage); |
---|
| | */ |
---|
| | |
---|
| | |
---|
| | IndexedTriangleArray groundGeometry = new IndexedTriangleArray(4, |
---|
| | IndexedTriangleArray.COORDINATES | IndexedTriangleArray.NORMALS, 6); |
---|
| | groundGeometry.setCoordinate(0, new Point3d(-20.0, -1.0, -20.0)); |
---|
| | groundGeometry.setCoordinate(1, new Point3d(20.0, -1.0, -20.0)); |
---|
| | groundGeometry.setCoordinate(2, new Point3d(20.0, -1.0, 20.0)); |
---|
| | groundGeometry.setCoordinate(3, new Point3d(-20.0, -1.0, 20.0)); |
---|
| | groundGeometry.setNormal(0, new Vector3f(0.0f, 1.0f, 0.0f)); |
---|
| | groundGeometry.setNormal(1, new Vector3f(0.0f, 1.0f, 0.0f)); |
---|
| | groundGeometry.setNormal(2, new Vector3f(0.0f, 1.0f, 0.0f)); |
---|
| | groundGeometry.setNormal(3, new Vector3f(0.0f, 1.0f, 0.0f)); |
---|
| | groundGeometry.setCoordinateIndices(0, new int[]{0, 3, 2}); |
---|
| | groundGeometry.setCoordinateIndices(3, new int[]{0, 2, 1}); |
---|
| | Appearance ap2 = new Appearance(); |
---|
| | Material m2 = new Material(); |
---|
| | m2.setDiffuseColor(0.5f, 1.0f, 0.2f); |
---|
| | ap2.setMaterial(m2); |
---|
| | Ground ground = new Ground(new BaseObject3D(groundGeometry, ap2)); |
---|
| | universe.place(ground); |
---|
| | |
---|
| | } |
---|
| | |
---|
| | public String getName() { |
---|
| | return name; |
---|
| |
---|
| | |
No description provided.
マージします.
774329a
intomaster
fromobj
on 14 Nov 2018