Package org.vrspace.server.obj
Class VRObject
- java.lang.Object
-
- org.vrspace.server.obj.Entity
-
- org.vrspace.server.obj.VRObject
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VRObject
active()
void
addChildren(VRObject... vrObjects)
void
addListener(VRObject obj)
protected boolean
canEqual(Object other)
boolean
equals(Object o)
Boolean
getActive()
Whether an object is active (can send events).Animation
getAnimation()
Currently active animationList<VRObject>
getChildren()
ConcurrentHashMap<ID,VRObject>
getListeners()
String
getMesh()
URL of the file containing the mesh.ID
getObjectId()
Boolean
getPermanent()
Permanent objects are always present (e.g.Point
getPosition()
Position in 3D space, used for spatial operations.Map<String,Object>
getProperties()
Custom object propertiesRotation
getRotation()
Point
getScale()
String
getScript()
Script that client runs.String
getStreamId()
Boolean
getTemporary()
Temporary objects will be deleted from the database along with their ownerWorld
getWorld()
Long
getWorldId()
int
hashCode()
boolean
isActive()
boolean
isPermanent()
boolean
isTemporary()
void
notifyListeners(VREvent event)
VRObject
passive()
void
processEvent(VREvent event)
This implementation does nothingvoid
removeListener(VRObject obj)
void
setActive(Boolean active)
Whether an object is active (can send events).void
setAnimation(Animation animation)
Currently active animationvoid
setChildren(List<VRObject> children)
void
setListeners(ConcurrentHashMap<ID,VRObject> listeners)
void
setMesh(String mesh)
URL of the file containing the mesh.void
setPermanent(Boolean permanent)
Permanent objects are always present (e.g.void
setPosition(Point position)
Position in 3D space, used for spatial operations.void
setProperties(Map<String,Object> properties)
Custom object propertiesvoid
setRotation(Rotation rotation)
void
setScale(Point scale)
void
setScript(String script)
Script that client runs.void
setStreamId(String streamId)
void
setTemporary(Boolean temporary)
Temporary objects will be deleted from the database along with their ownervoid
setWorld(World world)
void
setWorldId(Long worldId)
String
toString()
-
-
-
Method Detail
-
setWorld
public void setWorld(World world)
-
addChildren
public void addChildren(VRObject... vrObjects)
-
isPermanent
public boolean isPermanent()
-
addListener
public void addListener(VRObject obj)
-
removeListener
public void removeListener(VRObject obj)
-
notifyListeners
public void notifyListeners(VREvent event)
-
processEvent
public void processEvent(VREvent event)
This implementation does nothing- Parameters:
event
- Whatever has changed
-
getObjectId
public ID getObjectId()
-
active
public VRObject active()
-
passive
public VRObject passive()
-
isActive
public boolean isActive()
-
isTemporary
public boolean isTemporary()
-
getWorldId
public Long getWorldId()
-
getWorld
public World getWorld()
-
getPosition
public Point getPosition()
Position in 3D space, used for spatial operations.
-
getRotation
public Rotation getRotation()
-
getScale
public Point getScale()
-
getPermanent
public Boolean getPermanent()
Permanent objects are always present (e.g. sky)
-
getTemporary
public Boolean getTemporary()
Temporary objects will be deleted from the database along with their owner
-
getActive
public Boolean getActive()
Whether an object is active (can send events). E.g. online users, robots.
-
getMesh
public String getMesh()
URL of the file containing the mesh.
-
getScript
public String getScript()
Script that client runs. To prevent cross-site scripting, this is a read-only property.
-
getAnimation
public Animation getAnimation()
Currently active animation
-
getStreamId
public String getStreamId()
-
getListeners
public ConcurrentHashMap<ID,VRObject> getListeners()
-
setWorldId
public void setWorldId(Long worldId)
-
setPosition
public void setPosition(Point position)
Position in 3D space, used for spatial operations.
-
setRotation
public void setRotation(Rotation rotation)
-
setScale
public void setScale(Point scale)
-
setPermanent
public void setPermanent(Boolean permanent)
Permanent objects are always present (e.g. sky)
-
setTemporary
public void setTemporary(Boolean temporary)
Temporary objects will be deleted from the database along with their owner
-
setActive
public void setActive(Boolean active)
Whether an object is active (can send events). E.g. online users, robots.
-
setMesh
public void setMesh(String mesh)
URL of the file containing the mesh.
-
setScript
public void setScript(String script)
Script that client runs. To prevent cross-site scripting, this is a read-only property.
-
setAnimation
public void setAnimation(Animation animation)
Currently active animation
-
setStreamId
public void setStreamId(String streamId)
-
setListeners
public void setListeners(ConcurrentHashMap<ID,VRObject> listeners)
-
-