input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
private void process args string args for int i 0 i args length i if args i equals fps desired frame rate integer parse int args i 1 system out println desired frame rate desired frame rate i
|
process any command line args
|
public void load configuration url url config load listener listener config manager load configuration url listener
|
load the configuration data from the specified url but dont attach
|
public config instance get config instance string name return config manager get config instance name
|
get a named config instance
|
public void apply config spatial s clear shadow spatials parse model s 0 add shadow spatials
|
apply the configuration map information to a j me graph
|
public void apply config spatial s config manager apply config s
|
apply the configuration map information to a j me graph
|
public string get config base url return config manager get base url
|
get the base url for all texture and data loads
|
public void set config base url string url config manager set base url url
|
set the base url for all texture and data loads
|
public void add light light node light renderer add light light
|
add a global light to the scene
|
public void compute processor arming collection collection current light increment if current light high current light high increment increment if current light low current light low increment increment
|
the calculate method
|
public void remove light light node light renderer remove light light
|
remove a global light from the scene
|
private void add model node model node model root new node model system out println adding model model root attach child model models add model root entity e new entity model render component sc wm get render manager create render component model root e add component render component class sc wm add entity e
|
add a model to be visualized
|
public int num lights return renderer num lights
|
return the number of global lights
|
public void commit processor arming collection collection diffuse set current light current light current light 1 0f for int i 0 i targets length i targets i set diffuse diffuse
|
the commit method
|
public light node get light int i return renderer get light i
|
get a light at the index specified
|
private void load texture spatial s string name int index texture state ts string texture name texture dir name texture texture texture texture map get texture name if texture null url url null try url new url texture name catch malformed urlexception ex system out println ex texture texture manager load texture url texture minification filter trilinear texture magnification filter bilinear texture set wrap texture wrap mode repeat texture map put texture name texture ts set enabled true ts set texture texture index
|
load the specified texture
|
private void create ui world manager wm swing frame frame new swing frame wm center the frame frame set location relative to null show frame frame set visible true
|
create all of the swing windows and the 3 d window
|
public skybox get current skybox return renderer get current skybox
|
get the current skybox
|
private void set wl test harness boolean wl test harness this headless wl test harness renderer set wl test harness wl test harness
|
hack for wl 0
|
public void compute processor arming collection collection degrees rinc quaternion from angles 0 0f degrees 0 0f trans tinc if trans thigh tinc tinc trans thigh if trans tlow tinc tinc trans tlow scale sinc if scale shigh sinc sinc scale shigh if scale slow sinc sinc scale slow
|
the calculate method
|
public void commit processor arming collection collection target set local rotation quaternion target set local translation 0 0f trans 0 0f target set local scale scale world manager add to update list target
|
the commit method
|
private void add model node model node model root new node model zbuffer state buf zbuffer state wm get render manager create renderer state render state state type zbuffer buf set enabled true buf set function zbuffer state test function less than or equal to model root set render state buf system out println adding model model root attach child model models add model root entity e new entity model render component sc wm get render manager create render component model root e add component render component class sc wm add entity e
|
add a model to be visualized
|
public void action performed action event e if e get source coord button if coords on coords on false system out println turning coordinates off else coords on true system out println turning coordinates on render capture set enable coords on if e get source grid button if grid on grid on false system out println turning grid off else grid on true system out println turning grid on if e get source exit item system exit 1
|
the method which gets the state change from the buttons
|
public void apply to geometry geometry geo shader state glslshader objects state world manager get render manager create renderer state render state state type glslshader objects shader state set uniform scale 1 2f shader state set uniform color1 0 8f 0 7f 0 0f shader state set uniform color2 0 6f 0 1f 0 0f geo set render state shader state world manager add render updater this this
|
this applies this shader to the given geometry
|
public void update object o shader state load v shader f shader
|
this loads the shader
|
public void compute processor arming collection collection degrees increment quaternion from angles 0 0f degrees 0 0f quaternion mult position trans pos
|
the calculate method
|
public void commit processor arming collection collection target set local translation trans pos x trans pos y trans pos z world manager add to update list target
|
the commit method
|
public void set mass float m mass m
|
get the mass
|
public void set inertia float x float y float z inertia x x inertia y y inertia z z
|
get the inertia
|
public void set linear velocity float x float y float z linear velocity x x linear velocity y y linear velocity z z
|
set the linear velocity
|
public vector3f get inertia return inertia
|
get the inertia
|
public vector3f get linear velocity return linear velocity
|
get the inertia
|
public void apply shader vector3f position shader ret null float d geometry get world bound distance to position if d distance if current shader high shader current shader high shader current ts high ts ret current shader else if current shader low shader current shader low shader current ts low ts ret current shader if ret null need to reapply if ret null system out println applying shader current shader geometry set render state current ts current shader apply to geometry geometry geometry update render state
|
get the appropriate shader given the position null means it is the
|
public jmecollision component create collision component node node jmecollision component cc new jmecollision component this node return cc
|
this creates a default collision component object
|
public jbullet physics component create physics component jbullet collision component cc jbullet physics component pc new jbullet physics component this cc need to wait for node to initialize so just return return pc
|
this creates a jbullet physics component
|
public void remove collision component collision component cc synchronized collision components collision components remove cc spatial map remove cc get node collision tree manager get instance remove collision tree cc get node
|
remove the jme collision component from collision consideration
|
public void add time step listener time step listener listener synchronized listener set listener set add listener
|
adds a new timestep listener
|
public void remove time step listener time step listener listener synchronized listener set listener set remove listener
|
removes a timestep listener
|
private void fire time step event time step event tse synchronized listener set for time step listener l listener set l time step action performed tse
|
notifies all of the listeners of the time step event
|
public void remove reporting node node n synchronized collision components spatial map remove n
|
remove the jme collision component from collision consideration
|
public boolean is reporting node node n synchronized collision components return spatial map get n null
|
returns whether the given node is a reporting node for the given
|
public void pick all ray ray pick results result boolean include ortho camera component camera system out println pick all synchronized world manager get render manager get collision lock synchronized collision components for int i 0 i collision components size i jmecollision component cc jmecollision component collision components get i if cc is pickable node node cc get node if include ortho node get render queue mode com jme renderer renderer queue ortho process ortho pick node ray result camera else node find pick ray result
|
a pick routine which will pick against every scene rendered
|
private void process ortho pick node node ray ray pick results result camera component cc vector3f p new vector3f vector3f screen pt new vector3f abstract camera ac abstract camera cc get camera ray get origin add ray get direction p ac get screen coordinates p screen pt check for intersection node result cc screen pt ray
|
pick against a graph which is in ortho mode
|
public pick info pick all eye ray ray eye ray camera component cc boolean geometry pick boolean interpolata data return pick all eye ray eye ray cc geometry pick interpolata data false
|
a pick routine that picks against all collision components returning them
|
private void remove dead nodes spatial node if node instanceof node if node node get quantity 0 spatial children node node get children to array new spatial node node get quantity if children null for spatial child children remove dead nodes child if node node get quantity 0 node remove from parent else node remove from parent else node remove from parent
|
remove any nodes that no longer have children
|
public void set buffer byte buffer buffer raw data buffer
|
set the buffer to be used for grabbing the frame bufer
|
private render state set gather render states spatial leaf render state set state set new render state set deque spatial stack new linked list spatial n leaf while n null stack push n n n get parent while stack size 0 n stack pop get render states n state set return state set
|
given a leaf spatial determine all the renderstates that apply to that
|
public pick info pick all world ray ray world ray boolean geometry pick boolean interpolata data return pick all world ray world ray geometry pick interpolata data false null
|
a pick routine that picks against all collision components returning them
|
public byte buffer get buffer return raw data
|
get the buffer to be used for grabbing the frame bufer
|
public buffered image get buffered image return create buffered image raw data
|
this creates and returns a buffered image containing the frame buffer data
|
private void get render states spatial n render state set state set for int i 0 i render state state type values length i no more iterator creation render state state type type render state state type values i state set add render state n get render state type
|
get all the renderstates that are applied directly to the spatial
|
public void set current boolean cur current cur
|
set the current value
|
private jmepick details get pick details geometry g pick info pick info pick data pick data jmecollision component cc null entity entity null jmepick details pick details null first find the topmost parent node parent g get parent node node parent cc jmecollision component spatial map get node while cc null parent null node parent parent parent get parent cc jmecollision component spatial map get node entity cc get entity pick details new jmepick details this entity node cc pick info pick data pick data get distance return pick details
|
find the entity which contains this geometry
|
public node get scene root return scene root
|
get the scene root
|
public void set scene root node node pending update true world manager get default world manager get render manager update scene root this node wait for update
|
set the scene root
|
public void set attach point node ap pending update true world manager get default world manager get render manager update attach point this ap wait for update
|
set the attach point for this render component
|
public void find collisions spatial sp collision results cr synchronized world manager get render manager get collision lock synchronized collision components for int i 0 i collision components size i jmecollision component cc jmecollision component collision components get i if cc is collidable node node cc get node node find collisions sp cr
|
find the collisions for the scene
|
public void add geometry lod geometry lod lod synchronized geometry lodmap geometry lodmap put lod get geometry lod
|
add a geometry lod to track
|
public node get attach point return attach point
|
set the attach point for this render component
|
public void set ortho boolean flag pending update true world manager get default world manager get render manager update ortho this flag wait for update
|
set the othographic projection flag
|
public boolean get ortho return ortho
|
get the value of the orthographic projection flag
|
public void apply states spatial s for render state state state set s set render state state
|
add all the states to the spatial
|
private collision details get collision details geometry g collision info collision info collision data collision data jmecollision component cc null entity entity null jmecollision details collision details null first find the topmost parent node parent g get parent node node parent cc jmecollision component spatial map get node while cc null parent null node parent parent parent get parent cc jmecollision component spatial map get node entity cc get entity collision details new jmecollision details this entity node cc collision info collision data return collision details
|
find the entity which contains this geometry
|
public void set lighting enabled boolean flag if lighting enabled flag lighting enabled flag pending update true world manager get default world manager get render manager update lighting this wait for update
|
set the lighting enable flag
|
public void add shadow map shader shader s synchronized shadow map shaders shadow map shaders add s
|
add a shadow map shader to update camera state upon
|
public boolean contains state class extends render state state class boolean ret false for render state s state set if state class is assignable from s get class ret true break return ret
|
returns true if this set contains a state of the specified class
|
public void add light light node light synchronized lights lights add light pending update true world manager get default world manager get render manager update lighting this wait for update
|
add a global light to the scene
|
public void remove light light node light synchronized lights lights remove light pending update true world manager get default world manager get render manager update lighting this wait for update
|
remove a global light from the scene
|
public int num lights int num 0 synchronized lights num lights size return num
|
return the number of global lights
|
public jbullet collision component create collision component node node jbullet collision component cc new jbullet collision component this node need to wait for node to initialize so just return return cc
|
this creates a default collision component object
|
public light node get light int i light node light null synchronized lights light light node lights get i return light
|
get a light at the index specified
|
public jbullet collision component create collision component collision shape cs jbullet collision component cc new jbullet collision component this cs need to wait for node to initialize so just return return cc
|
this creates a default collision component object
|
public jbullet collision component create collision component tri mesh mesh jbullet collision component cc null synchronized dynamics world cc new jbullet collision component this mesh need to wait for node to initialize so just return return cc
|
this creates a default collision component object
|
public void remove collision component collision component cc jbullet collision component jcc jbullet collision component cc synchronized dynamics world collision components remove cc if jcc get physics component null dynamics world remove rigid body rigid body jcc get collision object else if cc get node null cc get node remove geometric update listener this dynamics world remove collision object jcc get collision object
|
remove the jme collision component from collision consideration
|
public void ray test vector3f from vector3f to collision world ray result callback result synchronized dynamics world dynamics world ray test from to result
|
a pick routine which will pick against every scene rendered
|
public pick info get pick info return pick info
|
get the pick info
|
public void reset solver solver reset
|
rest the solver for deterministic behaviour
|
public pick info pick all eye ray ray eye ray camera component cc boolean geometry pick boolean interpolata data return null
|
todo need to implement this
|
public vector3f get tex coord return tex coord
|
get the texture coord
|
public pick info pick all world ray ray world ray boolean geometry pick boolean interpolata data return null
|
todo need to implement this
|
public int get tri index return tri index
|
get the tri index
|
public pick info pick all eye ray ray eye ray camera component cc boolean geometry pick boolean interpolata data boolean include ortho return null
|
todo need to implement this
|
public collision system load collision system class system collision system cs collision system collision systems get system if cs null initialize the system try try cs collision system system new instance catch illegal access exception e1 system out println system could not be created e1 return null catch instantiation exception e2 system out println system could not be created e2 return null collision systems put system cs cs set world manager world manager return cs
|
this method loads the specified collision system
|
public pick info pick all world ray ray world ray boolean geometry pick boolean interpolata data boolean include ortho camera component cc return null
|
todo need to implement this
|
public void remove collision component collision component cc jbullet collision component jcc jbullet collision component cc synchronized collision components collision components remove jcc jcc get node remove geometric update listener this collision world remove collision object jcc get collision object
|
remove the jme collision component from collision consideration
|
public void ray test vector3f from vector3f to collision world ray result callback result synchronized collision components collision world ray test from to result
|
a pick routine which will pick against every scene rendered
|
public void add light light node light synchronized entity lock synchronized lights lights add light lights changed true entity changed true
|
add a global light to the scene
|
public void remove light light node light synchronized entity lock synchronized lights lights remove light lights changed true entity changed true
|
remove a global light from the scene
|
public long get last render time return last render time
|
get the time in nanoseconds required to render this entity during
|
public void add to reflected node n reflected model attach child n
|
add a model to the reflected scene
|
public int num lights int num 0 synchronized entity lock synchronized lights num lights size return num
|
return the number of global lights
|
public ray get eye ray return eye ray
|
get the eye ray
|
public ray get world ray return world ray
|
get the world ray
|
public void add component class key entity component component synchronized component map component map put key component component set entity this if world manager null world manager add component component fire entity component change this component true
|
add a component to the entity
|
public void add sector sector s synchronized sector list sector list add s
|
add a sector
|
public light node get light int i light node light null synchronized entity lock synchronized lights light light node lights get i return light
|
get a light at the index specified
|
public collision info get collision info return collision info
|
get the collision info
|
public collision results get collision results return collision results
|
get the distance from the intersection
|
private void process lights changed the list of lights have changed reset the light list global lights clear for int i 0 i lights size i global lights add lights get i now go through all the render scenes and apply the light state for int i 0 i render scenes size i render component scene render component render scenes get i scene update light state world manager true scene get scene root update render state
|
change the lights settings
|
public int num entities synchronized sub entities return sub entities size
|
get the number of sub entities
|
public entity get entity int index synchronized sub entities return entity sub entities get index
|
get the sub entity at the given index
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.