Class DummyClientWorld
- java.lang.Object
-
- be.yildizgames.module.graphic.dummy.DummyClientWorld
-
- All Implemented Interfaces:
GraphicWorld
public class DummyClientWorld extends Object implements GraphicWorld
- Author:
- Grégory Van den Borre
-
-
Constructor Summary
Constructors Constructor Description DummyClientWorld()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Linecreate3DLine()Create a simple line.BillboardSetcreateBillboardSet(Material material)Create a billboard set.CameracreateCamera(String name)Create a new camera with default behavior(freefly).DirectionalLightcreateDirectionalLight(String name, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a light of type directional light.ElectricArccreateElectricArc(be.yildizgames.common.geometry.Point3D origin, be.yildizgames.common.geometry.Point3D end, float width)Create an electric arc effect.ExplosioncreateExplosion()Create an explosion effect.GroundQuerycreateGroundQuery(RayProvider provider)LensFlarecreateLensFlare(LensFlare.LensFlareMaterial mat, be.yildizgames.common.geometry.Point3D position)Create a new lens flare.GraphicObjectcreateMovableDoodad(be.yildizgames.common.shape.Box box, Material material)Create a movable graphic box, it has no Id, is not selectable and will not be affected in any way by physics.GraphicObjectcreateMovableDoodad(be.yildizgames.common.shape.Plane plane, Material material)Create a movable graphic plane, it has no Id, is not selectable and will not be affected in any way by physics.GraphicObjectcreateMovableDoodad(be.yildizgames.common.shape.Sphere sphere, Material material)Create a movable graphic sphere, it has no Id, is not selectable and will not be affected in any way by physics.GraphicObjectcreateMovableDoodad(GraphicMesh mesh)Create a movable graphic object, it has no Id, is not selectable and will not be affected in any way by physics.GraphicObjectcreateMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position)Create a movable graphic physic box, it has a given Id, is selectable and will not be affected in any way by physics dynamic, but is collidable.GraphicObjectcreateMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position)GraphicObjectcreateMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position)Create a movable graphic physic sphere, it has a given Id, is selectable and will not be affected in any way by physics dynamic, but is collidable.GraphicObjectcreateMovableObject(be.yildizgames.common.model.EntityId id, GraphicMesh shape, be.yildizgames.common.geometry.Point3D position)Create a movable graphic object, it has a given Id, is selectable and will not be affected in any way by physics dynamic, and is not collidable.MovableTextcreateMovableText(String name, String text, Font font)Create a HUD text that will be displayed next an entity.OceancreateOcean()Create an ocean environment.ParticleSystemcreateParticleSystem()Create a particle system.PointLightcreatePointLight(String name, be.yildizgames.common.geometry.Point3D position)Create a new light of type point.QuerycreateQuery(RayProvider provider)SkycreateSky()Create a sky environment.SpotLightcreateSpotLight(String name, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a light of type spot light.GraphicObjectcreateStaticDoodad(be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic box, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics.GraphicObjectcreateStaticDoodad(be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic plane, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics.GraphicObjectcreateStaticDoodad(be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position)Create a static graphic sphere, it has no Id, is not selectable, cannot move, the direction is the base direction and will not be affected in any way by physics.GraphicObjectcreateStaticDoodad(be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic sphere, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics.GraphicObjectcreateStaticDoodad(GraphicMesh mesh, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic object, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics.GraphicObjectcreateStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic physic box, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable.GraphicObjectcreateStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic physic plane, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable.GraphicObjectcreateStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)Create a static graphic physic sphere, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable.GraphicObjectcreateStaticObject(be.yildizgames.common.model.EntityId id, GraphicMesh shape, be.yildizgames.common.geometry.Point3D position)Create a static graphic physic object, the physic object is a primitive instead of a mesh, to improve performances, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics .GraphicObjectcreateStaticObject(be.yildizgames.common.model.EntityId id, GraphicMesh mesh, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)voiddeleteLight(Light light)Delete a light.voiddeleteLight(String name)Unregister and delete a light.CameragetCamera(String name)Retrieve a Camera from its unique name.CameragetDefaultCamera()LightgetLight(String name)Retrieve a Light from its unique name.StringgetName()booleanisDebug()voidserializeShapeFromMesh(String mesh, String file, String name)Create a physic serialized shape from a graphic mesh and save it in a file.voidsetAmbientLight(be.yildizgames.module.color.Color color)Set the scene ambient light.voidsetDebugMode()Activate the debug mode on this world.voidsetSkybox(Skybox sky)Build a sky box.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface be.yildizgames.module.graphic.GraphicWorld
createMovableText, createStaticDoodad
-
-
-
-
Method Detail
-
createQuery
public Query createQuery(RayProvider provider)
- Specified by:
createQueryin interfaceGraphicWorld
-
createGroundQuery
public GroundQuery createGroundQuery(RayProvider provider)
- Specified by:
createGroundQueryin interfaceGraphicWorld
-
createMovableDoodad
public GraphicObject createMovableDoodad(be.yildizgames.common.shape.Box box, Material material)
Description copied from interface:GraphicWorldCreate a movable graphic box, it has no Id, is not selectable and will not be affected in any way by physics. It is usually used to represent not selectable object like small animals, unreachable background objects...- Specified by:
createMovableDoodadin interfaceGraphicWorld- Parameters:
box- Box to use as graphic resource.material- The material to set.- Returns:
- The built object.
-
createMovableDoodad
public GraphicObject createMovableDoodad(be.yildizgames.common.shape.Sphere sphere, Material material)
Description copied from interface:GraphicWorldCreate a movable graphic sphere, it has no Id, is not selectable and will not be affected in any way by physics. It is usually used to represent not selectable object like small animals, unreachable background objects...- Specified by:
createMovableDoodadin interfaceGraphicWorld- Parameters:
sphere- Sphere to use as graphic resource.material- The material to set.- Returns:
- The built object.
-
createMovableDoodad
public GraphicObject createMovableDoodad(be.yildizgames.common.shape.Plane plane, Material material)
Description copied from interface:GraphicWorldCreate a movable graphic plane, it has no Id, is not selectable and will not be affected in any way by physics. It is usually used to represent not selectable object like small animals, unreachable background objects...- Specified by:
createMovableDoodadin interfaceGraphicWorld- Parameters:
plane- Plane to use as graphic resource.material- The material to set.- Returns:
- The built object.
-
createMovableDoodad
public GraphicObject createMovableDoodad(GraphicMesh mesh)
Description copied from interface:GraphicWorldCreate a movable graphic object, it has no Id, is not selectable and will not be affected in any way by physics. It is usually used to represent not selectable object like small animals, unreachable background objects...- Specified by:
createMovableDoodadin interfaceGraphicWorld- Parameters:
mesh- Mesh to use as graphic resource.- Returns:
- The built object.
-
createStaticDoodad
public GraphicObject createStaticDoodad(be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Description copied from interface:GraphicWorldCreate a static graphic box, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Specified by:
createStaticDoodadin interfaceGraphicWorld- Parameters:
box- Box to use as graphic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticDoodad
public GraphicObject createStaticDoodad(be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Description copied from interface:GraphicWorldCreate a static graphic plane, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Specified by:
createStaticDoodadin interfaceGraphicWorld- Parameters:
plane- Plane to use as graphic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticDoodad
public GraphicObject createStaticDoodad(be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Description copied from interface:GraphicWorldCreate a static graphic sphere, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Specified by:
createStaticDoodadin interfaceGraphicWorld- Parameters:
sphere- Sphere to use as graphic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticDoodad
public GraphicObject createStaticDoodad(be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position)
Description copied from interface:GraphicWorldCreate a static graphic sphere, it has no Id, is not selectable, cannot move, the direction is the base direction and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Specified by:
createStaticDoodadin interfaceGraphicWorld- Parameters:
sphere- Sphere to use as graphic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticDoodad
public GraphicObject createStaticDoodad(GraphicMesh mesh, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Description copied from interface:GraphicWorldCreate a static graphic object, it has no Id, is not selectable, cannot move, and will not be affected in any way by physics. It is usually used to represent unselectable object like small vegetation, small rocks...- Specified by:
createStaticDoodadin interfaceGraphicWorld- Parameters:
mesh- Mesh to use as graphic resource.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticObject
public GraphicObject createStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Description copied from interface:GraphicWorldCreate a static graphic physic box, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable. It is usually used to represent selectable or collidable object like buildings, trees...- Specified by:
createStaticObjectin interfaceGraphicWorld- Parameters:
id- id to retrieve when object is selected, has collisions...box- Box to use as graphic and physic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticObject
public GraphicObject createStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Description copied from interface:GraphicWorldCreate a static graphic physic sphere, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable. It is usually used to represent selectable or collidable object like buildings, trees...- Specified by:
createStaticObjectin interfaceGraphicWorld- Parameters:
id- id to retrieve when object is selected, has collisions...sphere- Sphere to use as graphic and physic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticObject
public GraphicObject createStaticObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Description copied from interface:GraphicWorldCreate a static graphic physic plane, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics dynamic, but is collidable. It is usually used to represent selectable or collidable object like buildings, trees...- Specified by:
createStaticObjectin interfaceGraphicWorld- Parameters:
id- id to retrieve when object is selected, has collisions...plane- Plane to use as graphic resource.material- The material to set.position- Object immutable position, InvalidParamException is thrown in case of null parameter.direction- Object immutable direction, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createStaticObject
public GraphicObject createStaticObject(be.yildizgames.common.model.EntityId id, GraphicMesh shape, be.yildizgames.common.geometry.Point3D position)
Description copied from interface:GraphicWorldCreate a static graphic physic object, the physic object is a primitive instead of a mesh, to improve performances, it has a given Id, is selectable, cannot move, and will not be affected in any way by physics . It is usually used to represent selectable object like buildings, trees...- Specified by:
createStaticObjectin interfaceGraphicWorld- Parameters:
id- id to retrieve when object is selected, has collisions...shape- Shape to use as graphic and physic resource, physic shape is a primitive instead of a mesh to improve performance.position- Object immutable position, InvalidParamException is thrown in case of null parameter.- Returns:
- The built object.
-
createMovableObject
public GraphicObject createMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Box box, Material material, be.yildizgames.common.geometry.Point3D position)
Description copied from interface:GraphicWorldCreate a movable graphic physic box, it has a given Id, is selectable and will not be affected in any way by physics dynamic, but is collidable. It is usually used to represent playable or movable object like characters, vehicles...- Specified by:
createMovableObjectin interfaceGraphicWorld- Parameters:
id- id to retrieve when object is selected, has collisions...box- Box to use as graphic and physic resource.material- The material to set.position- Initial object position.- Returns:
- The built object.
-
createMovableObject
public GraphicObject createMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Plane plane, Material material, be.yildizgames.common.geometry.Point3D position)
- Specified by:
createMovableObjectin interfaceGraphicWorld
-
createMovableObject
public GraphicObject createMovableObject(be.yildizgames.common.model.EntityId id, be.yildizgames.common.shape.Sphere sphere, Material material, be.yildizgames.common.geometry.Point3D position)
Description copied from interface:GraphicWorldCreate a movable graphic physic sphere, it has a given Id, is selectable and will not be affected in any way by physics dynamic, but is collidable. It is usually used to represent playable or movable object like characters, vehicles...- Specified by:
createMovableObjectin interfaceGraphicWorld- Parameters:
id- id to retrieve when object is selected, has collisions...sphere- Sphere to use as graphic and physic resource.material- The material to set.position- Initial object position.- Returns:
- The built object.
-
createMovableObject
public GraphicObject createMovableObject(be.yildizgames.common.model.EntityId id, GraphicMesh shape, be.yildizgames.common.geometry.Point3D position)
Description copied from interface:GraphicWorldCreate a movable graphic object, it has a given Id, is selectable and will not be affected in any way by physics dynamic, and is not collidable. It is usually used to represent playable or movable object like characters, vehicles...- Specified by:
createMovableObjectin interfaceGraphicWorld- Parameters:
id- id to retrieve when object is selected.shape- A container for a graphic mesh.position- Initial object position.- Returns:
- The built object.
-
createCamera
public Camera createCamera(String name)
Description copied from interface:GraphicWorldCreate a new camera with default behavior(freefly).- Specified by:
createCamerain interfaceGraphicWorld- Parameters:
name- Camera name, must be unique.- Returns:
- The newly built camera.
-
setSkybox
public void setSkybox(Skybox sky)
Description copied from interface:GraphicWorldBuild a sky box.- Specified by:
setSkyboxin interfaceGraphicWorld- Parameters:
sky- The material to use.
-
setDebugMode
public void setDebugMode()
Description copied from interface:GraphicWorldActivate the debug mode on this world.- Specified by:
setDebugModein interfaceGraphicWorld
-
setAmbientLight
public void setAmbientLight(be.yildizgames.module.color.Color color)
Description copied from interface:GraphicWorldSet the scene ambient light.- Specified by:
setAmbientLightin interfaceGraphicWorld- Parameters:
color- Light color.
-
createPointLight
public PointLight createPointLight(String name, be.yildizgames.common.geometry.Point3D position)
Description copied from interface:GraphicWorldCreate a new light of type point.- Specified by:
createPointLightin interfaceGraphicWorld- Parameters:
name- Name of the light, must be unique.position- Light position.- Returns:
- The newly built light.
-
createElectricArc
public ElectricArc createElectricArc(be.yildizgames.common.geometry.Point3D origin, be.yildizgames.common.geometry.Point3D end, float width)
Description copied from interface:GraphicWorldCreate an electric arc effect.- Specified by:
createElectricArcin interfaceGraphicWorld- Parameters:
origin- Electric arc origin position.end- Electric arc end position.width- Elements width.- Returns:
- The created ElectricArc.
-
createExplosion
public Explosion createExplosion()
Description copied from interface:GraphicWorldCreate an explosion effect.- Specified by:
createExplosionin interfaceGraphicWorld- Returns:
- The created Explosion.
-
createParticleSystem
public ParticleSystem createParticleSystem()
Description copied from interface:GraphicWorldCreate a particle system.- Specified by:
createParticleSystemin interfaceGraphicWorld- Returns:
- The created ParticleSystem.
-
createSky
public Sky createSky()
Description copied from interface:GraphicWorldCreate a sky environment.- Specified by:
createSkyin interfaceGraphicWorld- Returns:
- The created Sky.
-
createOcean
public Ocean createOcean()
Description copied from interface:GraphicWorldCreate an ocean environment.- Specified by:
createOceanin interfaceGraphicWorld- Returns:
- The created Ocean.
-
getDefaultCamera
public Camera getDefaultCamera()
- Specified by:
getDefaultCamerain interfaceGraphicWorld- Returns:
- The camera built at same time as this world.
-
create3DLine
public Line create3DLine()
Description copied from interface:GraphicWorldCreate a simple line.- Specified by:
create3DLinein interfaceGraphicWorld- Returns:
- The created Line.
-
createLensFlare
public LensFlare createLensFlare(LensFlare.LensFlareMaterial mat, be.yildizgames.common.geometry.Point3D position)
Description copied from interface:GraphicWorldCreate a new lens flare.- Specified by:
createLensFlarein interfaceGraphicWorld- Parameters:
mat- Lensflare materials.position- Lens flare origin position.- Returns:
- The created LensFlare.
-
createSpotLight
public SpotLight createSpotLight(String name, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Description copied from interface:GraphicWorldCreate a light of type spot light.- Specified by:
createSpotLightin interfaceGraphicWorld- Parameters:
name- Light name, must be unique.position- Spot position.direction- Spot direction.- Returns:
- The created light.
-
createDirectionalLight
public DirectionalLight createDirectionalLight(String name, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
Description copied from interface:GraphicWorldCreate a light of type directional light.- Specified by:
createDirectionalLightin interfaceGraphicWorld- Parameters:
name- Light name, must be unique.position- Light position.direction- Light direction.- Returns:
- The created light.
-
serializeShapeFromMesh
public void serializeShapeFromMesh(String mesh, String file, String name)
Description copied from interface:GraphicWorldCreate a physic serialized shape from a graphic mesh and save it in a file.- Specified by:
serializeShapeFromMeshin interfaceGraphicWorld- Parameters:
mesh- Mesh to use to get the vertices data.file- File to save.name- Associated name.
-
isDebug
public boolean isDebug()
- Specified by:
isDebugin interfaceGraphicWorld- Returns:
trueif the world is in debug mode.
-
deleteLight
public void deleteLight(Light light)
Description copied from interface:GraphicWorldDelete a light.- Specified by:
deleteLightin interfaceGraphicWorld- Parameters:
light- Light to delete.
-
getCamera
public Camera getCamera(String name)
Description copied from interface:GraphicWorldRetrieve a Camera from its unique name.- Specified by:
getCamerain interfaceGraphicWorld- Parameters:
name- Unique camera name.- Returns:
- Found camera.
-
getLight
public Light getLight(String name)
Description copied from interface:GraphicWorldRetrieve a Light from its unique name.- Specified by:
getLightin interfaceGraphicWorld- Parameters:
name- Unique light name.- Returns:
- Found light.
-
deleteLight
public void deleteLight(String name)
Description copied from interface:GraphicWorldUnregister and delete a light.- Specified by:
deleteLightin interfaceGraphicWorld- Parameters:
name- Name of the light to delete.
-
createMovableText
public MovableText createMovableText(String name, String text, Font font)
Description copied from interface:GraphicWorldCreate a HUD text that will be displayed next an entity.- Specified by:
createMovableTextin interfaceGraphicWorld- Parameters:
name- Object unique name.text- Text to display.font- Font to use.- Returns:
- The created movable text.
-
createBillboardSet
public BillboardSet createBillboardSet(Material material)
Description copied from interface:GraphicWorldCreate a billboard set.- Specified by:
createBillboardSetin interfaceGraphicWorld- Parameters:
material- Material to use.- Returns:
- The created billboard set.
-
createStaticObject
public GraphicObject createStaticObject(be.yildizgames.common.model.EntityId id, GraphicMesh mesh, be.yildizgames.common.geometry.Point3D position, be.yildizgames.common.geometry.Point3D direction)
- Specified by:
createStaticObjectin interfaceGraphicWorld
-
getName
public String getName()
- Specified by:
getNamein interfaceGraphicWorld
-
-