repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/scene_objects/GVRTextViewSceneObject.java | GVRTextViewSceneObject.getRefreshFrequency | public IntervalFrequency getRefreshFrequency() {
switch (mRefreshInterval) {
case REALTIME_REFRESH_INTERVAL:
return IntervalFrequency.REALTIME;
case HIGH_REFRESH_INTERVAL:
return IntervalFrequency.HIGH;
case LOW_REFRESH_INTERVAL:
... | java | public IntervalFrequency getRefreshFrequency() {
switch (mRefreshInterval) {
case REALTIME_REFRESH_INTERVAL:
return IntervalFrequency.REALTIME;
case HIGH_REFRESH_INTERVAL:
return IntervalFrequency.HIGH;
case LOW_REFRESH_INTERVAL:
... | [
"public",
"IntervalFrequency",
"getRefreshFrequency",
"(",
")",
"{",
"switch",
"(",
"mRefreshInterval",
")",
"{",
"case",
"REALTIME_REFRESH_INTERVAL",
":",
"return",
"IntervalFrequency",
".",
"REALTIME",
";",
"case",
"HIGH_REFRESH_INTERVAL",
":",
"return",
"IntervalFreq... | Get the refresh frequency of this scene object.
@return The refresh frequency of this TextViewSceneObject. | [
"Get",
"the",
"refresh",
"frequency",
"of",
"this",
"scene",
"object",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/scene_objects/GVRTextViewSceneObject.java#L627-L640 | train |
Samsung/GearVRf | GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVRPlaneEmitter.java | GVRPlaneEmitter.generateParticleVelocities | private float[] generateParticleVelocities()
{
float velocities[] = new float[mEmitRate * 3];
for ( int i = 0; i < mEmitRate * 3; i +=3 )
{
Vector3f nexVel = getNextVelocity();
velocities[i] = nexVel.x;
velocities[i+1] = nexVel.y;
velocities[i+... | java | private float[] generateParticleVelocities()
{
float velocities[] = new float[mEmitRate * 3];
for ( int i = 0; i < mEmitRate * 3; i +=3 )
{
Vector3f nexVel = getNextVelocity();
velocities[i] = nexVel.x;
velocities[i+1] = nexVel.y;
velocities[i+... | [
"private",
"float",
"[",
"]",
"generateParticleVelocities",
"(",
")",
"{",
"float",
"velocities",
"[",
"]",
"=",
"new",
"float",
"[",
"mEmitRate",
"*",
"3",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mEmitRate",
"*",
"3",
";",
"i",... | generate random velocities in the given range
@return | [
"generate",
"random",
"velocities",
"in",
"the",
"given",
"range"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVRPlaneEmitter.java#L86-L97 | train |
Samsung/GearVRf | GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVRPlaneEmitter.java | GVRPlaneEmitter.generateParticleTimeStamps | private float[] generateParticleTimeStamps(float totalTime)
{
float timeStamps[] = new float[mEmitRate * 2];
for ( int i = 0; i < mEmitRate * 2; i +=2 )
{
timeStamps[i] = totalTime + mRandom.nextFloat();
timeStamps[i + 1] = 0;
}
return timeStamps;
... | java | private float[] generateParticleTimeStamps(float totalTime)
{
float timeStamps[] = new float[mEmitRate * 2];
for ( int i = 0; i < mEmitRate * 2; i +=2 )
{
timeStamps[i] = totalTime + mRandom.nextFloat();
timeStamps[i + 1] = 0;
}
return timeStamps;
... | [
"private",
"float",
"[",
"]",
"generateParticleTimeStamps",
"(",
"float",
"totalTime",
")",
"{",
"float",
"timeStamps",
"[",
"]",
"=",
"new",
"float",
"[",
"mEmitRate",
"*",
"2",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mEmitRate",
... | Generate random time stamps from the current time upto the next one second.
Passed as texture coordinates to the vertex shader, an unused field is present
with every pair passed.
@param totalTime
@return | [
"Generate",
"random",
"time",
"stamps",
"from",
"the",
"current",
"time",
"upto",
"the",
"next",
"one",
"second",
".",
"Passed",
"as",
"texture",
"coordinates",
"to",
"the",
"vertex",
"shader",
"an",
"unused",
"field",
"is",
"present",
"with",
"every",
"pair... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVRPlaneEmitter.java#L107-L116 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/WidgetLib.java | WidgetLib.init | public static WidgetLib init(GVRContext gvrContext, String customPropertiesAsset)
throws InterruptedException, JSONException, NoSuchMethodException {
if (mInstance == null) {
// Constructor sets mInstance to ensure the initialization order
new WidgetLib(gvrContext, customProp... | java | public static WidgetLib init(GVRContext gvrContext, String customPropertiesAsset)
throws InterruptedException, JSONException, NoSuchMethodException {
if (mInstance == null) {
// Constructor sets mInstance to ensure the initialization order
new WidgetLib(gvrContext, customProp... | [
"public",
"static",
"WidgetLib",
"init",
"(",
"GVRContext",
"gvrContext",
",",
"String",
"customPropertiesAsset",
")",
"throws",
"InterruptedException",
",",
"JSONException",
",",
"NoSuchMethodException",
"{",
"if",
"(",
"mInstance",
"==",
"null",
")",
"{",
"// Cons... | Initialize an instance of Widget Lib. It has to be done before any usage of library.
The application needs to hold onto the returned WidgetLib reference for as long as the
library is going to be used.
@param gvrContext A valid {@link GVRContext} instance
@param customPropertiesAsset An optional asset JSON file containi... | [
"Initialize",
"an",
"instance",
"of",
"Widget",
"Lib",
".",
"It",
"has",
"to",
"be",
"done",
"before",
"any",
"usage",
"of",
"library",
".",
"The",
"application",
"needs",
"to",
"hold",
"onto",
"the",
"returned",
"WidgetLib",
"reference",
"for",
"as",
"lon... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/WidgetLib.java#L49-L56 | train |
Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/AnimationInteractivityManager.java | AnimationInteractivityManager.BuildInteractiveObjectFromAnchor | public void BuildInteractiveObjectFromAnchor(Sensor anchorSensor, String anchorDestination) {
InteractiveObject interactiveObject = new InteractiveObject();
interactiveObject.setSensor(anchorSensor, anchorDestination);
interactiveObjects.add(interactiveObject);
} | java | public void BuildInteractiveObjectFromAnchor(Sensor anchorSensor, String anchorDestination) {
InteractiveObject interactiveObject = new InteractiveObject();
interactiveObject.setSensor(anchorSensor, anchorDestination);
interactiveObjects.add(interactiveObject);
} | [
"public",
"void",
"BuildInteractiveObjectFromAnchor",
"(",
"Sensor",
"anchorSensor",
",",
"String",
"anchorDestination",
")",
"{",
"InteractiveObject",
"interactiveObject",
"=",
"new",
"InteractiveObject",
"(",
")",
";",
"interactiveObject",
".",
"setSensor",
"(",
"anch... | BuildInteractiveObjectFromAnchor is a special type of interactive object in that it does not get
built using ROUTE's.
@param anchorSensor is the Sensor that describes the sensor set to an Anchor
@param anchorDestination is either another Viewpoint, url to a web site or another x3d scene | [
"BuildInteractiveObjectFromAnchor",
"is",
"a",
"special",
"type",
"of",
"interactive",
"object",
"in",
"that",
"it",
"does",
"not",
"get",
"built",
"using",
"ROUTE",
"s",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/AnimationInteractivityManager.java#L502-L506 | train |
Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/AnimationInteractivityManager.java | AnimationInteractivityManager.RunScript | private void RunScript(InteractiveObject interactiveObject, String functionName, Object[] parameters) {
boolean complete = false;
if ( V8JavaScriptEngine) {
GVRJavascriptV8File gvrJavascriptV8File = interactiveObject.getScriptObject().getGVRJavascriptV8File();
String paramString ... | java | private void RunScript(InteractiveObject interactiveObject, String functionName, Object[] parameters) {
boolean complete = false;
if ( V8JavaScriptEngine) {
GVRJavascriptV8File gvrJavascriptV8File = interactiveObject.getScriptObject().getGVRJavascriptV8File();
String paramString ... | [
"private",
"void",
"RunScript",
"(",
"InteractiveObject",
"interactiveObject",
",",
"String",
"functionName",
",",
"Object",
"[",
"]",
"parameters",
")",
"{",
"boolean",
"complete",
"=",
"false",
";",
"if",
"(",
"V8JavaScriptEngine",
")",
"{",
"GVRJavascriptV8File... | Run the JavaScript program, Output saved in localBindings | [
"Run",
"the",
"JavaScript",
"program",
"Output",
"saved",
"in",
"localBindings"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/AnimationInteractivityManager.java#L2210-L2249 | train |
Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/AnimationInteractivityManager.java | AnimationInteractivityManager.ConvertDirectionalVectorToQuaternion | public Quaternionf ConvertDirectionalVectorToQuaternion(Vector3f d) {
d.negate();
Quaternionf q = new Quaternionf();
// check for exception condition
if ((d.x == 0) && (d.z == 0)) {
// exception condition if direction is (0,y,0):
// straight up, straight down or a... | java | public Quaternionf ConvertDirectionalVectorToQuaternion(Vector3f d) {
d.negate();
Quaternionf q = new Quaternionf();
// check for exception condition
if ((d.x == 0) && (d.z == 0)) {
// exception condition if direction is (0,y,0):
// straight up, straight down or a... | [
"public",
"Quaternionf",
"ConvertDirectionalVectorToQuaternion",
"(",
"Vector3f",
"d",
")",
"{",
"d",
".",
"negate",
"(",
")",
";",
"Quaternionf",
"q",
"=",
"new",
"Quaternionf",
"(",
")",
";",
"// check for exception condition",
"if",
"(",
"(",
"d",
".",
"x",... | Converts a vector into a quaternion.
Used for the direction of spot and directional lights
Called upon initialization and updates to those vectors
@param d | [
"Converts",
"a",
"vector",
"into",
"a",
"quaternion",
".",
"Used",
"for",
"the",
"direction",
"of",
"spot",
"and",
"directional",
"lights",
"Called",
"upon",
"initialization",
"and",
"updates",
"to",
"those",
"vectors"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/AnimationInteractivityManager.java#L2701-L2732 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/FPSCounter.java | FPSCounter.count | public static void count() {
long duration = SystemClock.uptimeMillis() - startTime;
float avgFPS = sumFrames / (duration / 1000f);
Log.v("FPSCounter",
"total frames = %d, total elapsed time = %d ms, average fps = %f",
sumFrames, duration, avgFPS);
} | java | public static void count() {
long duration = SystemClock.uptimeMillis() - startTime;
float avgFPS = sumFrames / (duration / 1000f);
Log.v("FPSCounter",
"total frames = %d, total elapsed time = %d ms, average fps = %f",
sumFrames, duration, avgFPS);
} | [
"public",
"static",
"void",
"count",
"(",
")",
"{",
"long",
"duration",
"=",
"SystemClock",
".",
"uptimeMillis",
"(",
")",
"-",
"startTime",
";",
"float",
"avgFPS",
"=",
"sumFrames",
"/",
"(",
"duration",
"/",
"1000f",
")",
";",
"Log",
".",
"v",
"(",
... | Computes FPS average | [
"Computes",
"FPS",
"average"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/FPSCounter.java#L35-L42 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/FPSCounter.java | FPSCounter.startCheck | public static void startCheck(String extra) {
startCheckTime = System.currentTimeMillis();
nextCheckTime = startCheckTime;
Log.d(Log.SUBSYSTEM.TRACING, "FPSCounter" , "[%d] startCheck %s", startCheckTime, extra);
} | java | public static void startCheck(String extra) {
startCheckTime = System.currentTimeMillis();
nextCheckTime = startCheckTime;
Log.d(Log.SUBSYSTEM.TRACING, "FPSCounter" , "[%d] startCheck %s", startCheckTime, extra);
} | [
"public",
"static",
"void",
"startCheck",
"(",
"String",
"extra",
")",
"{",
"startCheckTime",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"nextCheckTime",
"=",
"startCheckTime",
";",
"Log",
".",
"d",
"(",
"Log",
".",
"SUBSYSTEM",
".",
"TRACING",
... | Start check of execution time
@param extra | [
"Start",
"check",
"of",
"execution",
"time"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/FPSCounter.java#L56-L60 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/FPSCounter.java | FPSCounter.timeCheck | public static void timeCheck(String extra) {
if (startCheckTime > 0) {
long now = System.currentTimeMillis();
long diff = now - nextCheckTime;
nextCheckTime = now;
Log.d(Log.SUBSYSTEM.TRACING, "FPSCounter", "[%d, %d] timeCheck: %s", now, diff, extra);
}
... | java | public static void timeCheck(String extra) {
if (startCheckTime > 0) {
long now = System.currentTimeMillis();
long diff = now - nextCheckTime;
nextCheckTime = now;
Log.d(Log.SUBSYSTEM.TRACING, "FPSCounter", "[%d, %d] timeCheck: %s", now, diff, extra);
}
... | [
"public",
"static",
"void",
"timeCheck",
"(",
"String",
"extra",
")",
"{",
"if",
"(",
"startCheckTime",
">",
"0",
")",
"{",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"long",
"diff",
"=",
"now",
"-",
"nextCheckTime",
";",
"n... | Computes execution time
@param extra | [
"Computes",
"execution",
"time"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/FPSCounter.java#L66-L73 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRMorphAnimation.java | GVRMorphAnimation.animate | public void animate(GVRHybridObject object, float animationTime)
{
GVRMeshMorph morph = (GVRMeshMorph) mTarget;
mKeyInterpolator.animate(animationTime * mDuration, mCurrentValues);
morph.setWeights(mCurrentValues);
} | java | public void animate(GVRHybridObject object, float animationTime)
{
GVRMeshMorph morph = (GVRMeshMorph) mTarget;
mKeyInterpolator.animate(animationTime * mDuration, mCurrentValues);
morph.setWeights(mCurrentValues);
} | [
"public",
"void",
"animate",
"(",
"GVRHybridObject",
"object",
",",
"float",
"animationTime",
")",
"{",
"GVRMeshMorph",
"morph",
"=",
"(",
"GVRMeshMorph",
")",
"mTarget",
";",
"mKeyInterpolator",
".",
"animate",
"(",
"animationTime",
"*",
"mDuration",
",",
"mCur... | Computes the blend weights for the given time and
updates them in the target. | [
"Computes",
"the",
"blend",
"weights",
"for",
"the",
"given",
"time",
"and",
"updates",
"them",
"in",
"the",
"target",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRMorphAnimation.java#L55-L62 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRLODGroup.java | GVRLODGroup.addRange | public synchronized void addRange(final float range, final GVRSceneObject sceneObject)
{
if (null == sceneObject) {
throw new IllegalArgumentException("sceneObject must be specified!");
}
if (range < 0) {
throw new IllegalArgumentException("range cannot be negative");... | java | public synchronized void addRange(final float range, final GVRSceneObject sceneObject)
{
if (null == sceneObject) {
throw new IllegalArgumentException("sceneObject must be specified!");
}
if (range < 0) {
throw new IllegalArgumentException("range cannot be negative");... | [
"public",
"synchronized",
"void",
"addRange",
"(",
"final",
"float",
"range",
",",
"final",
"GVRSceneObject",
"sceneObject",
")",
"{",
"if",
"(",
"null",
"==",
"sceneObject",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"sceneObject must be specified... | Add a range to this LOD group. Specify the scene object that should be displayed in this
range. Add the LOG group as a component to the parent scene object. The scene objects
associated with each range will automatically be added as children to the parent.
@param range show the scene object if the camera distance is gr... | [
"Add",
"a",
"range",
"to",
"this",
"LOD",
"group",
".",
"Specify",
"the",
"scene",
"object",
"that",
"should",
"be",
"displayed",
"in",
"this",
"range",
".",
"Add",
"the",
"LOG",
"group",
"as",
"a",
"component",
"to",
"the",
"parent",
"scene",
"object",
... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRLODGroup.java#L64-L94 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRLODGroup.java | GVRLODGroup.onDrawFrame | public void onDrawFrame(float frameTime) {
final GVRSceneObject owner = getOwnerObject();
if (owner == null) {
return;
}
final int size = mRanges.size();
final GVRTransform t = getGVRContext().getMainScene().getMainCameraRig().getCenterCamera().getTransform();
... | java | public void onDrawFrame(float frameTime) {
final GVRSceneObject owner = getOwnerObject();
if (owner == null) {
return;
}
final int size = mRanges.size();
final GVRTransform t = getGVRContext().getMainScene().getMainCameraRig().getCenterCamera().getTransform();
... | [
"public",
"void",
"onDrawFrame",
"(",
"float",
"frameTime",
")",
"{",
"final",
"GVRSceneObject",
"owner",
"=",
"getOwnerObject",
"(",
")",
";",
"if",
"(",
"owner",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
"int",
"size",
"=",
"mRanges",
".",
... | Do not call directly.
@deprecated | [
"Do",
"not",
"call",
"directly",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRLODGroup.java#L100-L135 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/ShellFactory.java | ShellFactory.createConsoleShell | public static Shell createConsoleShell(String prompt, String appName, Object... handlers) {
ConsoleIO io = new ConsoleIO();
List<String> path = new ArrayList<String>(1);
path.add(prompt);
MultiMap<String, Object> modifAuxHandlers = new ArrayHashMultiMap<String, Object>();
modif... | java | public static Shell createConsoleShell(String prompt, String appName, Object... handlers) {
ConsoleIO io = new ConsoleIO();
List<String> path = new ArrayList<String>(1);
path.add(prompt);
MultiMap<String, Object> modifAuxHandlers = new ArrayHashMultiMap<String, Object>();
modif... | [
"public",
"static",
"Shell",
"createConsoleShell",
"(",
"String",
"prompt",
",",
"String",
"appName",
",",
"Object",
"...",
"handlers",
")",
"{",
"ConsoleIO",
"io",
"=",
"new",
"ConsoleIO",
"(",
")",
";",
"List",
"<",
"String",
">",
"path",
"=",
"new",
"... | One of facade methods for operating the Shell.
Run the obtained Shell with commandLoop().
@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)
@param prompt Prompt to be displayed
@param appName The app name string
@param handlers Command ha... | [
"One",
"of",
"facade",
"methods",
"for",
"operating",
"the",
"Shell",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/ShellFactory.java#L35-L55 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/ShellFactory.java | ShellFactory.createConsoleShell | public static Shell createConsoleShell(String prompt, String appName, Object mainHandler) {
return createConsoleShell(prompt, appName, mainHandler, new EmptyMultiMap<String, Object>());
} | java | public static Shell createConsoleShell(String prompt, String appName, Object mainHandler) {
return createConsoleShell(prompt, appName, mainHandler, new EmptyMultiMap<String, Object>());
} | [
"public",
"static",
"Shell",
"createConsoleShell",
"(",
"String",
"prompt",
",",
"String",
"appName",
",",
"Object",
"mainHandler",
")",
"{",
"return",
"createConsoleShell",
"(",
"prompt",
",",
"appName",
",",
"mainHandler",
",",
"new",
"EmptyMultiMap",
"<",
"St... | Facade method for operating the Shell.
Run the obtained Shell with commandLoop().
@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)
@param prompt Prompt to be displayed
@param appName The app name string
@param mainHandler Command handler... | [
"Facade",
"method",
"for",
"operating",
"the",
"Shell",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/ShellFactory.java#L104-L106 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/ShellFactory.java | ShellFactory.createSubshell | public static Shell createSubshell(String pathElement, Shell parent, String appName, Object mainHandler,
MultiMap<String, Object> auxHandlers) {
List<String> newPath = new ArrayList<String>(parent.getPath());
newPath.add(pathElement);
Shell subshell = new Shell(parent.getSettings()... | java | public static Shell createSubshell(String pathElement, Shell parent, String appName, Object mainHandler,
MultiMap<String, Object> auxHandlers) {
List<String> newPath = new ArrayList<String>(parent.getPath());
newPath.add(pathElement);
Shell subshell = new Shell(parent.getSettings()... | [
"public",
"static",
"Shell",
"createSubshell",
"(",
"String",
"pathElement",
",",
"Shell",
"parent",
",",
"String",
"appName",
",",
"Object",
"mainHandler",
",",
"MultiMap",
"<",
"String",
",",
"Object",
">",
"auxHandlers",
")",
"{",
"List",
"<",
"String",
"... | Facade method facilitating the creation of subshell.
Subshell is created and run inside Command method and shares the same IO and naming strategy.
Run the obtained Shell with commandLoop().
@param pathElement sub-prompt
@param parent Shell to be subshell'd
@param appName The app name string
@param mainHandler Command... | [
"Facade",
"method",
"facilitating",
"the",
"creation",
"of",
"subshell",
".",
"Subshell",
"is",
"created",
"and",
"run",
"inside",
"Command",
"method",
"and",
"shares",
"the",
"same",
"IO",
"and",
"naming",
"strategy",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/ShellFactory.java#L121-L136 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/ShellFactory.java | ShellFactory.createSubshell | public static Shell createSubshell(String pathElement, Shell parent, String appName, Object mainHandler) {
return createSubshell(pathElement, parent, appName, mainHandler, new EmptyMultiMap<String, Object>());
} | java | public static Shell createSubshell(String pathElement, Shell parent, String appName, Object mainHandler) {
return createSubshell(pathElement, parent, appName, mainHandler, new EmptyMultiMap<String, Object>());
} | [
"public",
"static",
"Shell",
"createSubshell",
"(",
"String",
"pathElement",
",",
"Shell",
"parent",
",",
"String",
"appName",
",",
"Object",
"mainHandler",
")",
"{",
"return",
"createSubshell",
"(",
"pathElement",
",",
"parent",
",",
"appName",
",",
"mainHandle... | Facade method facilitating the creation of subshell.
Subshell is created and run inside Command method and shares the same IO and naming strtategy.
Run the obtained Shell with commandLoop().
@param pathElement sub-prompt
@param parent Shell to be subshell'd
@param appName The app name string
@param mainHandler Comman... | [
"Facade",
"method",
"facilitating",
"the",
"creation",
"of",
"subshell",
".",
"Subshell",
"is",
"created",
"and",
"run",
"inside",
"Command",
"method",
"and",
"shares",
"the",
"same",
"IO",
"and",
"naming",
"strtategy",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/ShellFactory.java#L150-L152 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRAnimationChannel.java | GVRAnimationChannel.animate | public void animate(float animationTime, Matrix4f mat)
{
mRotInterpolator.animate(animationTime, mRotKey);
mPosInterpolator.animate(animationTime, mPosKey);
mSclInterpolator.animate(animationTime, mScaleKey);
mat.translationRotateScale(mPosKey[0], mPosKey[1], mPosKey[2], mRotKey[0], ... | java | public void animate(float animationTime, Matrix4f mat)
{
mRotInterpolator.animate(animationTime, mRotKey);
mPosInterpolator.animate(animationTime, mPosKey);
mSclInterpolator.animate(animationTime, mScaleKey);
mat.translationRotateScale(mPosKey[0], mPosKey[1], mPosKey[2], mRotKey[0], ... | [
"public",
"void",
"animate",
"(",
"float",
"animationTime",
",",
"Matrix4f",
"mat",
")",
"{",
"mRotInterpolator",
".",
"animate",
"(",
"animationTime",
",",
"mRotKey",
")",
";",
"mPosInterpolator",
".",
"animate",
"(",
"animationTime",
",",
"mPosKey",
")",
";"... | Obtains the transform for a specific time in animation.
@param animationTime The time in animation.
@return The transform. | [
"Obtains",
"the",
"transform",
"for",
"a",
"specific",
"time",
"in",
"animation",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRAnimationChannel.java#L291-L298 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPointLight.java | GVRPointLight.setAmbientIntensity | public void setAmbientIntensity(float r, float g, float b, float a) {
setVec4("ambient_intensity", r, g, b, a);
} | java | public void setAmbientIntensity(float r, float g, float b, float a) {
setVec4("ambient_intensity", r, g, b, a);
} | [
"public",
"void",
"setAmbientIntensity",
"(",
"float",
"r",
",",
"float",
"g",
",",
"float",
"b",
",",
"float",
"a",
")",
"{",
"setVec4",
"(",
"\"ambient_intensity\"",
",",
"r",
",",
"g",
",",
"b",
",",
"a",
")",
";",
"}"
] | Set the ambient light intensity.
This designates the color of the ambient reflection.
It is multiplied by the material ambient color to derive
the hue of the ambient reflection for that material.
The built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named
{@code ambient_intensity} to control the... | [
"Set",
"the",
"ambient",
"light",
"intensity",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPointLight.java#L116-L118 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPointLight.java | GVRPointLight.setDiffuseIntensity | public void setDiffuseIntensity(float r, float g, float b, float a) {
setVec4("diffuse_intensity", r, g, b, a);
} | java | public void setDiffuseIntensity(float r, float g, float b, float a) {
setVec4("diffuse_intensity", r, g, b, a);
} | [
"public",
"void",
"setDiffuseIntensity",
"(",
"float",
"r",
",",
"float",
"g",
",",
"float",
"b",
",",
"float",
"a",
")",
"{",
"setVec4",
"(",
"\"diffuse_intensity\"",
",",
"r",
",",
"g",
",",
"b",
",",
"a",
")",
";",
"}"
] | Set the diffuse light intensity.
This designates the color of the diffuse reflection.
It is multiplied by the material diffuse color to derive
the hue of the diffuse reflection for that material.
The built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named
{@code diffuse_intensity} to control the... | [
"Set",
"the",
"diffuse",
"light",
"intensity",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPointLight.java#L150-L152 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPointLight.java | GVRPointLight.setSpecularIntensity | public void setSpecularIntensity(float r, float g, float b, float a) {
setVec4("specular_intensity", r, g, b, a);
} | java | public void setSpecularIntensity(float r, float g, float b, float a) {
setVec4("specular_intensity", r, g, b, a);
} | [
"public",
"void",
"setSpecularIntensity",
"(",
"float",
"r",
",",
"float",
"g",
",",
"float",
"b",
",",
"float",
"a",
")",
"{",
"setVec4",
"(",
"\"specular_intensity\"",
",",
"r",
",",
"g",
",",
"b",
",",
"a",
")",
";",
"}"
] | Set the specular intensity of the light.
This designates the color of the specular reflection.
It is multiplied by the material specular color to derive
the hue of the specular reflection for that material.
The built-in phong shader {@link GVRPhongShader} uses a {@code vec4} uniform named
{@code specular_intensity} to... | [
"Set",
"the",
"specular",
"intensity",
"of",
"the",
"light",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPointLight.java#L183-L185 | train |
Samsung/GearVRf | GVRf/Framework/backend_monoscopic/src/main/java/org/gearvrf/MonoscopicInternalSensorListener.java | MonoscopicInternalSensorListener.getQuaternionW | private float getQuaternionW(float x, float y, float z) {
return (float) Math.cos(Math.asin(Math.sqrt(x * x + y * y + z * z)));
} | java | private float getQuaternionW(float x, float y, float z) {
return (float) Math.cos(Math.asin(Math.sqrt(x * x + y * y + z * z)));
} | [
"private",
"float",
"getQuaternionW",
"(",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
")",
"{",
"return",
"(",
"float",
")",
"Math",
".",
"cos",
"(",
"Math",
".",
"asin",
"(",
"Math",
".",
"sqrt",
"(",
"x",
"*",
"x",
"+",
"y",
"*",
"y"... | Finds the missing value. Seems to lose a degree of freedom, but it
doesn't. That degree of freedom is already lost by the sensor. | [
"Finds",
"the",
"missing",
"value",
".",
"Seems",
"to",
"lose",
"a",
"degree",
"of",
"freedom",
"but",
"it",
"doesn",
"t",
".",
"That",
"degree",
"of",
"freedom",
"is",
"already",
"lost",
"by",
"the",
"sensor",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/backend_monoscopic/src/main/java/org/gearvrf/MonoscopicInternalSensorListener.java#L69-L71 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/DebugServer.java | DebugServer.shutdown | public void shutdown() {
debugConnection = null;
shuttingDown = true;
try {
if (serverSocket != null) {
serverSocket.close();
}
} catch (IOException e) {
e.printStackTrace();
}
} | java | public void shutdown() {
debugConnection = null;
shuttingDown = true;
try {
if (serverSocket != null) {
serverSocket.close();
}
} catch (IOException e) {
e.printStackTrace();
}
} | [
"public",
"void",
"shutdown",
"(",
")",
"{",
"debugConnection",
"=",
"null",
";",
"shuttingDown",
"=",
"true",
";",
"try",
"{",
"if",
"(",
"serverSocket",
"!=",
"null",
")",
"{",
"serverSocket",
".",
"close",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"I... | Shuts down the server. Active connections are not affected. | [
"Shuts",
"down",
"the",
"server",
".",
"Active",
"connections",
"are",
"not",
"affected",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/DebugServer.java#L159-L169 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/DebugServer.java | DebugServer.run | @Override
public void run() {
ExecutorService executorService = Executors.newFixedThreadPool(maxClients);
try {
serverSocket = new ServerSocket(port, maxClients);
while (!shuttingDown) {
try {
Socket socket = serverSocket.accept();
... | java | @Override
public void run() {
ExecutorService executorService = Executors.newFixedThreadPool(maxClients);
try {
serverSocket = new ServerSocket(port, maxClients);
while (!shuttingDown) {
try {
Socket socket = serverSocket.accept();
... | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"ExecutorService",
"executorService",
"=",
"Executors",
".",
"newFixedThreadPool",
"(",
"maxClients",
")",
";",
"try",
"{",
"serverSocket",
"=",
"new",
"ServerSocket",
"(",
"port",
",",
"maxClients",
")"... | Runs the server. | [
"Runs",
"the",
"server",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/DebugServer.java#L174-L199 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRScene.java | GVRScene.removeAllSceneObjects | public synchronized void removeAllSceneObjects() {
final GVRCameraRig rig = getMainCameraRig();
final GVRSceneObject head = rig.getOwnerObject();
rig.removeAllChildren();
NativeScene.removeAllSceneObjects(getNative());
for (final GVRSceneObject child : mSceneRoot.getChildren()) ... | java | public synchronized void removeAllSceneObjects() {
final GVRCameraRig rig = getMainCameraRig();
final GVRSceneObject head = rig.getOwnerObject();
rig.removeAllChildren();
NativeScene.removeAllSceneObjects(getNative());
for (final GVRSceneObject child : mSceneRoot.getChildren()) ... | [
"public",
"synchronized",
"void",
"removeAllSceneObjects",
"(",
")",
"{",
"final",
"GVRCameraRig",
"rig",
"=",
"getMainCameraRig",
"(",
")",
";",
"final",
"GVRSceneObject",
"head",
"=",
"rig",
".",
"getOwnerObject",
"(",
")",
";",
"rig",
".",
"removeAllChildren"... | Remove all scene objects. | [
"Remove",
"all",
"scene",
"objects",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRScene.java#L159-L185 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java | GVRPicker.setPickRay | public void setPickRay(float ox, float oy, float oz, float dx, float dy, float dz)
{
synchronized (this)
{
mRayOrigin.x = ox;
mRayOrigin.y = oy;
mRayOrigin.z = oz;
mRayDirection.x = dx;
mRayDirection.y = dy;
mRayDirection.z = dz... | java | public void setPickRay(float ox, float oy, float oz, float dx, float dy, float dz)
{
synchronized (this)
{
mRayOrigin.x = ox;
mRayOrigin.y = oy;
mRayOrigin.z = oz;
mRayDirection.x = dx;
mRayDirection.y = dy;
mRayDirection.z = dz... | [
"public",
"void",
"setPickRay",
"(",
"float",
"ox",
",",
"float",
"oy",
",",
"float",
"oz",
",",
"float",
"dx",
",",
"float",
"dy",
",",
"float",
"dz",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"mRayOrigin",
".",
"x",
"=",
"ox",
";",
"mRayOr... | Sets the origin and direction of the pick ray.
@param ox X coordinate of origin.
@param oy Y coordinate of origin.
@param oz Z coordinate of origin.
@param dx X coordinate of ray direction.
@param dy Y coordinate of ray direction.
@param dz Z coordinate of ray direction.
The coordinate system of the... | [
"Sets",
"the",
"origin",
"and",
"direction",
"of",
"the",
"pick",
"ray",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L418-L429 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java | GVRPicker.onDrawFrame | public void onDrawFrame(float frameTime)
{
if (isEnabled() && (mScene != null) && mPickEventLock.tryLock())
{
// Don't call if we are in the middle of processing another pick
try
{
doPick();
}
finally
{
... | java | public void onDrawFrame(float frameTime)
{
if (isEnabled() && (mScene != null) && mPickEventLock.tryLock())
{
// Don't call if we are in the middle of processing another pick
try
{
doPick();
}
finally
{
... | [
"public",
"void",
"onDrawFrame",
"(",
"float",
"frameTime",
")",
"{",
"if",
"(",
"isEnabled",
"(",
")",
"&&",
"(",
"mScene",
"!=",
"null",
")",
"&&",
"mPickEventLock",
".",
"tryLock",
"(",
")",
")",
"{",
"// Don't call if we are in the middle of processing anoth... | Called every frame if the picker is enabled
to generate pick events.
@param frameTime starting time of the current frame | [
"Called",
"every",
"frame",
"if",
"the",
"picker",
"is",
"enabled",
"to",
"generate",
"pick",
"events",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L487-L501 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java | GVRPicker.processPick | public void processPick(boolean touched, MotionEvent event)
{
mPickEventLock.lock();
mTouched = touched;
mMotionEvent = event;
doPick();
mPickEventLock.unlock();
} | java | public void processPick(boolean touched, MotionEvent event)
{
mPickEventLock.lock();
mTouched = touched;
mMotionEvent = event;
doPick();
mPickEventLock.unlock();
} | [
"public",
"void",
"processPick",
"(",
"boolean",
"touched",
",",
"MotionEvent",
"event",
")",
"{",
"mPickEventLock",
".",
"lock",
"(",
")",
";",
"mTouched",
"=",
"touched",
";",
"mMotionEvent",
"=",
"event",
";",
"doPick",
"(",
")",
";",
"mPickEventLock",
... | Scans the scene graph to collect picked items
and generates appropriate pick and touch events.
This function is called by the cursor controller
internally but can also be used to funnel a
stream of Android motion events into the picker.
@see #pickObjects(GVRScene, float, float, float, float, float, float)
@param touche... | [
"Scans",
"the",
"scene",
"graph",
"to",
"collect",
"picked",
"items",
"and",
"generates",
"appropriate",
"pick",
"and",
"touch",
"events",
".",
"This",
"function",
"is",
"called",
"by",
"the",
"cursor",
"controller",
"internally",
"but",
"can",
"also",
"be",
... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L555-L562 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java | GVRPicker.propagateOnNoPick | protected void propagateOnNoPick(GVRPicker picker)
{
if (mEventOptions.contains(EventOptions.SEND_PICK_EVENTS))
{
if (mEventOptions.contains(EventOptions.SEND_TO_LISTENERS))
{
getGVRContext().getEventManager().sendEvent(this, IPickEvents.class, "onNoPick", pic... | java | protected void propagateOnNoPick(GVRPicker picker)
{
if (mEventOptions.contains(EventOptions.SEND_PICK_EVENTS))
{
if (mEventOptions.contains(EventOptions.SEND_TO_LISTENERS))
{
getGVRContext().getEventManager().sendEvent(this, IPickEvents.class, "onNoPick", pic... | [
"protected",
"void",
"propagateOnNoPick",
"(",
"GVRPicker",
"picker",
")",
"{",
"if",
"(",
"mEventOptions",
".",
"contains",
"(",
"EventOptions",
".",
"SEND_PICK_EVENTS",
")",
")",
"{",
"if",
"(",
"mEventOptions",
".",
"contains",
"(",
"EventOptions",
".",
"SE... | Propagate onNoPick events to listeners
@param picker GVRPicker which generated the event | [
"Propagate",
"onNoPick",
"events",
"to",
"listeners"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L666-L679 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java | GVRPicker.propagateOnMotionOutside | protected void propagateOnMotionOutside(MotionEvent event)
{
if (mEventOptions.contains(EventOptions.SEND_TOUCH_EVENTS))
{
if (mEventOptions.contains(EventOptions.SEND_TO_LISTENERS))
{
getGVRContext().getEventManager().sendEvent(this, ITouchEvents.class, "onMo... | java | protected void propagateOnMotionOutside(MotionEvent event)
{
if (mEventOptions.contains(EventOptions.SEND_TOUCH_EVENTS))
{
if (mEventOptions.contains(EventOptions.SEND_TO_LISTENERS))
{
getGVRContext().getEventManager().sendEvent(this, ITouchEvents.class, "onMo... | [
"protected",
"void",
"propagateOnMotionOutside",
"(",
"MotionEvent",
"event",
")",
"{",
"if",
"(",
"mEventOptions",
".",
"contains",
"(",
"EventOptions",
".",
"SEND_TOUCH_EVENTS",
")",
")",
"{",
"if",
"(",
"mEventOptions",
".",
"contains",
"(",
"EventOptions",
"... | Propagate onMotionOutside events to listeners
@param MotionEvent Android MotionEvent when nothing is picked | [
"Propagate",
"onMotionOutside",
"events",
"to",
"listeners"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L704-L717 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java | GVRPicker.propagateOnEnter | protected void propagateOnEnter(GVRPickedObject hit)
{
GVRSceneObject hitObject = hit.getHitObject();
GVREventManager eventManager = getGVRContext().getEventManager();
if (mEventOptions.contains(EventOptions.SEND_TOUCH_EVENTS))
{
if (mEventOptions.contains(EventOptions.SE... | java | protected void propagateOnEnter(GVRPickedObject hit)
{
GVRSceneObject hitObject = hit.getHitObject();
GVREventManager eventManager = getGVRContext().getEventManager();
if (mEventOptions.contains(EventOptions.SEND_TOUCH_EVENTS))
{
if (mEventOptions.contains(EventOptions.SE... | [
"protected",
"void",
"propagateOnEnter",
"(",
"GVRPickedObject",
"hit",
")",
"{",
"GVRSceneObject",
"hitObject",
"=",
"hit",
".",
"getHitObject",
"(",
")",
";",
"GVREventManager",
"eventManager",
"=",
"getGVRContext",
"(",
")",
".",
"getEventManager",
"(",
")",
... | Propagate onEnter events to listeners
@param hit collision object | [
"Propagate",
"onEnter",
"events",
"to",
"listeners"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L723-L757 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java | GVRPicker.propagateOnTouch | protected void propagateOnTouch(GVRPickedObject hit)
{
if (mEventOptions.contains(EventOptions.SEND_TOUCH_EVENTS))
{
GVREventManager eventManager = getGVRContext().getEventManager();
GVRSceneObject hitObject = hit.getHitObject();
if (mEventOptions.contains(EventOp... | java | protected void propagateOnTouch(GVRPickedObject hit)
{
if (mEventOptions.contains(EventOptions.SEND_TOUCH_EVENTS))
{
GVREventManager eventManager = getGVRContext().getEventManager();
GVRSceneObject hitObject = hit.getHitObject();
if (mEventOptions.contains(EventOp... | [
"protected",
"void",
"propagateOnTouch",
"(",
"GVRPickedObject",
"hit",
")",
"{",
"if",
"(",
"mEventOptions",
".",
"contains",
"(",
"EventOptions",
".",
"SEND_TOUCH_EVENTS",
")",
")",
"{",
"GVREventManager",
"eventManager",
"=",
"getGVRContext",
"(",
")",
".",
"... | Propagate onTouchStart events to listeners
@param hit collision object | [
"Propagate",
"onTouchStart",
"events",
"to",
"listeners"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L763-L782 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java | GVRPicker.findCollider | protected GVRPickedObject findCollider(GVRPickedObject[] pickList, GVRCollider findme)
{
if (pickList == null)
{
return null;
}
for (GVRPickedObject hit : pickList)
{
if ((hit != null) && (hit.hitCollider == findme))
{
retur... | java | protected GVRPickedObject findCollider(GVRPickedObject[] pickList, GVRCollider findme)
{
if (pickList == null)
{
return null;
}
for (GVRPickedObject hit : pickList)
{
if ((hit != null) && (hit.hitCollider == findme))
{
retur... | [
"protected",
"GVRPickedObject",
"findCollider",
"(",
"GVRPickedObject",
"[",
"]",
"pickList",
",",
"GVRCollider",
"findme",
")",
"{",
"if",
"(",
"pickList",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"GVRPickedObject",
"hit",
":",
"pickL... | Find the collision against a specific collider in a list of collisions.
@param pickList collision list
@param findme collider to find
@return collision with the specified collider, null if not found | [
"Find",
"the",
"collision",
"against",
"a",
"specific",
"collider",
"in",
"a",
"list",
"of",
"collisions",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L894-L908 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java | GVRPicker.pickObjects | public static final GVRPickedObject[] pickObjects(GVRScene scene, float ox, float oy, float oz, float dx,
float dy, float dz) {
sFindObjectsLock.lock();
try {
final GVRPickedObject[] result = NativePicker.pickObjects(scene.getNative(), 0L... | java | public static final GVRPickedObject[] pickObjects(GVRScene scene, float ox, float oy, float oz, float dx,
float dy, float dz) {
sFindObjectsLock.lock();
try {
final GVRPickedObject[] result = NativePicker.pickObjects(scene.getNative(), 0L... | [
"public",
"static",
"final",
"GVRPickedObject",
"[",
"]",
"pickObjects",
"(",
"GVRScene",
"scene",
",",
"float",
"ox",
",",
"float",
"oy",
",",
"float",
"oz",
",",
"float",
"dx",
",",
"float",
"dy",
",",
"float",
"dz",
")",
"{",
"sFindObjectsLock",
".",
... | Casts a ray into the scene graph, and returns the objects it intersects.
The ray is defined by its origin {@code [ox, oy, oz]} and its direction
{@code [dx, dy, dz]}.
<p>
The ray origin may be [0, 0, 0] and the direction components should be
normalized from -1 to 1: Note that the y direction runs from -1 at the
botto... | [
"Casts",
"a",
"ray",
"into",
"the",
"scene",
"graph",
"and",
"returns",
"the",
"objects",
"it",
"intersects",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L1065-L1074 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java | GVRPicker.makeHitMesh | static GVRPickedObject makeHitMesh(long colliderPointer, float distance, float hitx, float hity, float hitz,
int faceIndex, float barycentricx, float barycentricy, float barycentricz,
float texu, float texv, float normalx, float normaly, float norma... | java | static GVRPickedObject makeHitMesh(long colliderPointer, float distance, float hitx, float hity, float hitz,
int faceIndex, float barycentricx, float barycentricy, float barycentricz,
float texu, float texv, float normalx, float normaly, float norma... | [
"static",
"GVRPickedObject",
"makeHitMesh",
"(",
"long",
"colliderPointer",
",",
"float",
"distance",
",",
"float",
"hitx",
",",
"float",
"hity",
",",
"float",
"hitz",
",",
"int",
"faceIndex",
",",
"float",
"barycentricx",
",",
"float",
"barycentricy",
",",
"f... | Internal utility to help JNI add hit objects to the pick list. Specifically for MeshColliders with picking
for UV, Barycentric, and normal coordinates enabled | [
"Internal",
"utility",
"to",
"help",
"JNI",
"add",
"hit",
"objects",
"to",
"the",
"pick",
"list",
".",
"Specifically",
"for",
"MeshColliders",
"with",
"picking",
"for",
"UV",
"Barycentric",
"and",
"normal",
"coordinates",
"enabled"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L1233-L1247 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/asynchronous/AsyncAtlasInfo.java | AsyncAtlasInfo.loadAtlasInformation | public static List<GVRAtlasInformation> loadAtlasInformation(InputStream ins) {
try {
int size = ins.available();
byte[] buffer = new byte[size];
ins.read(buffer);
return loadAtlasInformation(new JSONArray(new String(buffer, "UTF-8")));
} catch (JSONExce... | java | public static List<GVRAtlasInformation> loadAtlasInformation(InputStream ins) {
try {
int size = ins.available();
byte[] buffer = new byte[size];
ins.read(buffer);
return loadAtlasInformation(new JSONArray(new String(buffer, "UTF-8")));
} catch (JSONExce... | [
"public",
"static",
"List",
"<",
"GVRAtlasInformation",
">",
"loadAtlasInformation",
"(",
"InputStream",
"ins",
")",
"{",
"try",
"{",
"int",
"size",
"=",
"ins",
".",
"available",
"(",
")",
";",
"byte",
"[",
"]",
"buffer",
"=",
"new",
"byte",
"[",
"size",... | This method is a sync parse to the JSON stream of atlas information.
@return List of atlas information. | [
"This",
"method",
"is",
"a",
"sync",
"parse",
"to",
"the",
"JSON",
"stream",
"of",
"atlas",
"information",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/asynchronous/AsyncAtlasInfo.java#L41-L56 | train |
Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/node/MovieTexture.java | MovieTexture.setSpeed | public void setSpeed(float newValue) {
if (newValue < 0) newValue = 0;
this.pitch.setValue( newValue );
this.speed.setValue( newValue );
} | java | public void setSpeed(float newValue) {
if (newValue < 0) newValue = 0;
this.pitch.setValue( newValue );
this.speed.setValue( newValue );
} | [
"public",
"void",
"setSpeed",
"(",
"float",
"newValue",
")",
"{",
"if",
"(",
"newValue",
"<",
"0",
")",
"newValue",
"=",
"0",
";",
"this",
".",
"pitch",
".",
"setValue",
"(",
"newValue",
")",
";",
"this",
".",
"speed",
".",
"setValue",
"(",
"newValue... | Assign float value to inputOutput SFFloat field named speed.
Note that our implementation with ExoPlayer that pitch and speed will be set to the same value.
@param newValue | [
"Assign",
"float",
"value",
"to",
"inputOutput",
"SFFloat",
"field",
"named",
"speed",
".",
"Note",
"that",
"our",
"implementation",
"with",
"ExoPlayer",
"that",
"pitch",
"and",
"speed",
"will",
"be",
"set",
"to",
"the",
"same",
"value",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/node/MovieTexture.java#L124-L128 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderId.java | GVRShaderId.getUniformDescriptor | public String getUniformDescriptor(GVRContext ctx)
{
if (mShaderTemplate == null)
{
mShaderTemplate = makeTemplate(ID, ctx);
ctx.getShaderManager().addShaderID(this);
}
return mShaderTemplate.getUniformDescriptor();
} | java | public String getUniformDescriptor(GVRContext ctx)
{
if (mShaderTemplate == null)
{
mShaderTemplate = makeTemplate(ID, ctx);
ctx.getShaderManager().addShaderID(this);
}
return mShaderTemplate.getUniformDescriptor();
} | [
"public",
"String",
"getUniformDescriptor",
"(",
"GVRContext",
"ctx",
")",
"{",
"if",
"(",
"mShaderTemplate",
"==",
"null",
")",
"{",
"mShaderTemplate",
"=",
"makeTemplate",
"(",
"ID",
",",
"ctx",
")",
";",
"ctx",
".",
"getShaderManager",
"(",
")",
".",
"a... | Gets the string describing the uniforms used by shaders of this type.
@param ctx GVFContext shader is associated with
@return uniform descriptor string
@see #getTemplate(GVRContext) GVRShader#getUniformDescriptor() | [
"Gets",
"the",
"string",
"describing",
"the",
"uniforms",
"used",
"by",
"shaders",
"of",
"this",
"type",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderId.java#L48-L56 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderId.java | GVRShaderId.getTemplate | public GVRShader getTemplate(GVRContext ctx)
{
if (mShaderTemplate == null)
{
mShaderTemplate = makeTemplate(ID, ctx);
ctx.getShaderManager().addShaderID(this);
}
return mShaderTemplate;
} | java | public GVRShader getTemplate(GVRContext ctx)
{
if (mShaderTemplate == null)
{
mShaderTemplate = makeTemplate(ID, ctx);
ctx.getShaderManager().addShaderID(this);
}
return mShaderTemplate;
} | [
"public",
"GVRShader",
"getTemplate",
"(",
"GVRContext",
"ctx",
")",
"{",
"if",
"(",
"mShaderTemplate",
"==",
"null",
")",
"{",
"mShaderTemplate",
"=",
"makeTemplate",
"(",
"ID",
",",
"ctx",
")",
";",
"ctx",
".",
"getShaderManager",
"(",
")",
".",
"addShad... | Gets the Java subclass of GVRShader which implements
this shader type.
@param ctx GVRContext shader is associated with
@return GVRShader class implementing the shader type | [
"Gets",
"the",
"Java",
"subclass",
"of",
"GVRShader",
"which",
"implements",
"this",
"shader",
"type",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderId.java#L80-L88 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderId.java | GVRShaderId.makeTemplate | GVRShader makeTemplate(Class<? extends GVRShader> id, GVRContext ctx)
{
try
{
Constructor<? extends GVRShader> maker = id.getDeclaredConstructor(GVRContext.class);
return maker.newInstance(ctx);
}
catch (NoSuchMethodException | IllegalAccessException | Instant... | java | GVRShader makeTemplate(Class<? extends GVRShader> id, GVRContext ctx)
{
try
{
Constructor<? extends GVRShader> maker = id.getDeclaredConstructor(GVRContext.class);
return maker.newInstance(ctx);
}
catch (NoSuchMethodException | IllegalAccessException | Instant... | [
"GVRShader",
"makeTemplate",
"(",
"Class",
"<",
"?",
"extends",
"GVRShader",
">",
"id",
",",
"GVRContext",
"ctx",
")",
"{",
"try",
"{",
"Constructor",
"<",
"?",
"extends",
"GVRShader",
">",
"maker",
"=",
"id",
".",
"getDeclaredConstructor",
"(",
"GVRContext"... | Instantiates an instance of input Java shader class,
which must be derived from GVRShader or GVRShaderTemplate.
@param id Java class which implements shaders of this type.
@param ctx GVRContext shader belongs to
@return GVRShader subclass which implements this shader type | [
"Instantiates",
"an",
"instance",
"of",
"input",
"Java",
"shader",
"class",
"which",
"must",
"be",
"derived",
"from",
"GVRShader",
"or",
"GVRShaderTemplate",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderId.java#L107-L127 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/accessibility/GVRAccessibilitySpeech.java | GVRAccessibilitySpeech.start | public void start(GVRAccessibilitySpeechListener speechListener) {
mTts.setSpeechListener(speechListener);
mTts.getSpeechRecognizer().startListening(mTts.getSpeechRecognizerIntent());
} | java | public void start(GVRAccessibilitySpeechListener speechListener) {
mTts.setSpeechListener(speechListener);
mTts.getSpeechRecognizer().startListening(mTts.getSpeechRecognizerIntent());
} | [
"public",
"void",
"start",
"(",
"GVRAccessibilitySpeechListener",
"speechListener",
")",
"{",
"mTts",
".",
"setSpeechListener",
"(",
"speechListener",
")",
";",
"mTts",
".",
"getSpeechRecognizer",
"(",
")",
".",
"startListening",
"(",
"mTts",
".",
"getSpeechRecogniz... | Start speech recognizer.
@param speechListener | [
"Start",
"speech",
"recognizer",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/accessibility/GVRAccessibilitySpeech.java#L34-L37 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMesh.java | GVRMesh.setVertexBuffer | public void setVertexBuffer(GVRVertexBuffer vbuf)
{
if (vbuf == null)
{
throw new IllegalArgumentException("Vertex buffer cannot be null");
}
mVertices = vbuf;
NativeMesh.setVertexBuffer(getNative(), vbuf.getNative());
} | java | public void setVertexBuffer(GVRVertexBuffer vbuf)
{
if (vbuf == null)
{
throw new IllegalArgumentException("Vertex buffer cannot be null");
}
mVertices = vbuf;
NativeMesh.setVertexBuffer(getNative(), vbuf.getNative());
} | [
"public",
"void",
"setVertexBuffer",
"(",
"GVRVertexBuffer",
"vbuf",
")",
"{",
"if",
"(",
"vbuf",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Vertex buffer cannot be null\"",
")",
";",
"}",
"mVertices",
"=",
"vbuf",
";",
"NativeMe... | Changes the vertex buffer associated with this mesh.
@param vbuf new vertex buffer to use
@see #setVertices(float[])
@see #getVertexBuffer()
@see #getVertices() | [
"Changes",
"the",
"vertex",
"buffer",
"associated",
"with",
"this",
"mesh",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMesh.java#L184-L192 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMesh.java | GVRMesh.setIndexBuffer | public void setIndexBuffer(GVRIndexBuffer ibuf)
{
mIndices = ibuf;
NativeMesh.setIndexBuffer(getNative(), (ibuf != null) ? ibuf.getNative() : 0L);
} | java | public void setIndexBuffer(GVRIndexBuffer ibuf)
{
mIndices = ibuf;
NativeMesh.setIndexBuffer(getNative(), (ibuf != null) ? ibuf.getNative() : 0L);
} | [
"public",
"void",
"setIndexBuffer",
"(",
"GVRIndexBuffer",
"ibuf",
")",
"{",
"mIndices",
"=",
"ibuf",
";",
"NativeMesh",
".",
"setIndexBuffer",
"(",
"getNative",
"(",
")",
",",
"(",
"ibuf",
"!=",
"null",
")",
"?",
"ibuf",
".",
"getNative",
"(",
")",
":",... | Changes the index buffer associated with this mesh.
@param ibuf new index buffer to use
@see #setIndices(int[])
@see #getIndexBuffer()
@see #getIntIndices() | [
"Changes",
"the",
"index",
"buffer",
"associated",
"with",
"this",
"mesh",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMesh.java#L201-L205 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/log/Log.java | Log.rebuild | public static void rebuild(final MODE newMode) {
if (mode != newMode) {
mode = newMode;
TYPE type;
switch (mode) {
case DEBUG:
type = TYPE.ANDROID;
Log.startFullLog();
break;
case DEVELOPER:
... | java | public static void rebuild(final MODE newMode) {
if (mode != newMode) {
mode = newMode;
TYPE type;
switch (mode) {
case DEBUG:
type = TYPE.ANDROID;
Log.startFullLog();
break;
case DEVELOPER:
... | [
"public",
"static",
"void",
"rebuild",
"(",
"final",
"MODE",
"newMode",
")",
"{",
"if",
"(",
"mode",
"!=",
"newMode",
")",
"{",
"mode",
"=",
"newMode",
";",
"TYPE",
"type",
";",
"switch",
"(",
"mode",
")",
"{",
"case",
"DEBUG",
":",
"type",
"=",
"T... | Rebuild logging systems with updated mode
@param newMode log mode | [
"Rebuild",
"logging",
"systems",
"with",
"updated",
"mode"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/log/Log.java#L167-L190 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/log/Log.java | Log.e | public static int e(ISubsystem subsystem, String tag, String msg) {
return isEnabled(subsystem) ?
currentLog.e(tag, getMsg(subsystem,msg)) : 0;
} | java | public static int e(ISubsystem subsystem, String tag, String msg) {
return isEnabled(subsystem) ?
currentLog.e(tag, getMsg(subsystem,msg)) : 0;
} | [
"public",
"static",
"int",
"e",
"(",
"ISubsystem",
"subsystem",
",",
"String",
"tag",
",",
"String",
"msg",
")",
"{",
"return",
"isEnabled",
"(",
"subsystem",
")",
"?",
"currentLog",
".",
"e",
"(",
"tag",
",",
"getMsg",
"(",
"subsystem",
",",
"msg",
")... | Send an ERROR log message with specified subsystem. If subsystem is not enabled the message
will not be logged
@param subsystem logging subsystem
@param tag Used to identify the source of a log message. It usually identifies the class or
activity where the log call occurs.
@param msg The message you would like logged.
... | [
"Send",
"an",
"ERROR",
"log",
"message",
"with",
"specified",
"subsystem",
".",
"If",
"subsystem",
"is",
"not",
"enabled",
"the",
"message",
"will",
"not",
"be",
"logged"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/log/Log.java#L423-L426 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/log/Log.java | Log.d | public static void d(ISubsystem subsystem, String tag, String pattern, Object... parameters) {
if (!isEnabled(subsystem)) return;
d(subsystem, tag, format(pattern, parameters));
} | java | public static void d(ISubsystem subsystem, String tag, String pattern, Object... parameters) {
if (!isEnabled(subsystem)) return;
d(subsystem, tag, format(pattern, parameters));
} | [
"public",
"static",
"void",
"d",
"(",
"ISubsystem",
"subsystem",
",",
"String",
"tag",
",",
"String",
"pattern",
",",
"Object",
"...",
"parameters",
")",
"{",
"if",
"(",
"!",
"isEnabled",
"(",
"subsystem",
")",
")",
"return",
";",
"d",
"(",
"subsystem",
... | Send a DEBUG log message with specified subsystem. If subsystem is not enabled the message
will not be logged
@param subsystem logging subsystem
@param tag Used to identify the source of a log message. It usually identifies the class or
activity where the log call occurs.
@param pattern The message pattern
@return | [
"Send",
"a",
"DEBUG",
"log",
"message",
"with",
"specified",
"subsystem",
".",
"If",
"subsystem",
"is",
"not",
"enabled",
"the",
"message",
"will",
"not",
"be",
"logged"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/log/Log.java#L603-L606 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/log/Log.java | Log.deleteOldAndEmptyFiles | private static void deleteOldAndEmptyFiles() {
File dir = LOG_FILE_DIR;
if (dir.exists()) {
File[] files = dir.listFiles();
for (File f : files) {
if (f.length() == 0 ||
f.lastModified() + MAXFILEAGE < System.curren... | java | private static void deleteOldAndEmptyFiles() {
File dir = LOG_FILE_DIR;
if (dir.exists()) {
File[] files = dir.listFiles();
for (File f : files) {
if (f.length() == 0 ||
f.lastModified() + MAXFILEAGE < System.curren... | [
"private",
"static",
"void",
"deleteOldAndEmptyFiles",
"(",
")",
"{",
"File",
"dir",
"=",
"LOG_FILE_DIR",
";",
"if",
"(",
"dir",
".",
"exists",
"(",
")",
")",
"{",
"File",
"[",
"]",
"files",
"=",
"dir",
".",
"listFiles",
"(",
")",
";",
"for",
"(",
... | delete of files more than 1 day old | [
"delete",
"of",
"files",
"more",
"than",
"1",
"day",
"old"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/log/Log.java#L1217-L1229 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRExternalScene.java | GVRExternalScene.load | public boolean load(GVRScene scene)
{
GVRAssetLoader loader = getGVRContext().getAssetLoader();
if (scene == null)
{
scene = getGVRContext().getMainScene();
}
if (mReplaceScene)
{
loader.loadScene(getOwnerObject(), mVolume, mImportSettings, sc... | java | public boolean load(GVRScene scene)
{
GVRAssetLoader loader = getGVRContext().getAssetLoader();
if (scene == null)
{
scene = getGVRContext().getMainScene();
}
if (mReplaceScene)
{
loader.loadScene(getOwnerObject(), mVolume, mImportSettings, sc... | [
"public",
"boolean",
"load",
"(",
"GVRScene",
"scene",
")",
"{",
"GVRAssetLoader",
"loader",
"=",
"getGVRContext",
"(",
")",
".",
"getAssetLoader",
"(",
")",
";",
"if",
"(",
"scene",
"==",
"null",
")",
"{",
"scene",
"=",
"getGVRContext",
"(",
")",
".",
... | Loads the asset referenced by the file name
under the owner of this component.
If this component was constructed to replace the scene with
the asset, the scene will contain only the owner of this
component upon return. Otherwise, the loaded asset is a
child of this component's owner.
Loading the asset is performed in ... | [
"Loads",
"the",
"asset",
"referenced",
"by",
"the",
"file",
"name",
"under",
"the",
"owner",
"of",
"this",
"component",
".",
"If",
"this",
"component",
"was",
"constructed",
"to",
"replace",
"the",
"scene",
"with",
"the",
"asset",
"the",
"scene",
"will",
"... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRExternalScene.java#L133-L150 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRExternalScene.java | GVRExternalScene.load | public void load(IAssetEvents handler)
{
GVRAssetLoader loader = getGVRContext().getAssetLoader();
if (mReplaceScene)
{
loader.loadScene(getOwnerObject(), mVolume, mImportSettings, getGVRContext().getMainScene(), handler);
}
else
{
loader.load... | java | public void load(IAssetEvents handler)
{
GVRAssetLoader loader = getGVRContext().getAssetLoader();
if (mReplaceScene)
{
loader.loadScene(getOwnerObject(), mVolume, mImportSettings, getGVRContext().getMainScene(), handler);
}
else
{
loader.load... | [
"public",
"void",
"load",
"(",
"IAssetEvents",
"handler",
")",
"{",
"GVRAssetLoader",
"loader",
"=",
"getGVRContext",
"(",
")",
".",
"getAssetLoader",
"(",
")",
";",
"if",
"(",
"mReplaceScene",
")",
"{",
"loader",
".",
"loadScene",
"(",
"getOwnerObject",
"("... | Loads the asset referenced by the file name
under the owner of this component.
If this component was constructed to replace the scene with
the asset, the main scene of the current context
will contain only the owner of this
component upon return. Otherwise, the loaded asset is a
child of this component's owner.
Loadin... | [
"Loads",
"the",
"asset",
"referenced",
"by",
"the",
"file",
"name",
"under",
"the",
"owner",
"of",
"this",
"component",
".",
"If",
"this",
"component",
"was",
"constructed",
"to",
"replace",
"the",
"scene",
"with",
"the",
"asset",
"the",
"main",
"scene",
"... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRExternalScene.java#L169-L181 | train |
Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/Utility.java | Utility.parseMFString | public String[] parseMFString(String mfString) {
Vector<String> strings = new Vector<String>();
StringReader sr = new StringReader(mfString);
StreamTokenizer st = new StreamTokenizer(sr);
st.quoteChar('"');
st.quoteChar('\'');
String[] mfStrings = null;
int toke... | java | public String[] parseMFString(String mfString) {
Vector<String> strings = new Vector<String>();
StringReader sr = new StringReader(mfString);
StreamTokenizer st = new StreamTokenizer(sr);
st.quoteChar('"');
st.quoteChar('\'');
String[] mfStrings = null;
int toke... | [
"public",
"String",
"[",
"]",
"parseMFString",
"(",
"String",
"mfString",
")",
"{",
"Vector",
"<",
"String",
">",
"strings",
"=",
"new",
"Vector",
"<",
"String",
">",
"(",
")",
";",
"StringReader",
"sr",
"=",
"new",
"StringReader",
"(",
"mfString",
")",
... | multi-field string | [
"multi",
"-",
"field",
"string"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/Utility.java#L195-L222 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/asynchronous/AsyncBitmapTexture.java | AsyncBitmapTexture.getScreenSize | private static Point getScreenSize(Context context, Point p) {
if (p == null) {
p = new Point();
}
WindowManager windowManager = (WindowManager) context
.getSystemService(Context.WINDOW_SERVICE);
Display display = windowManager.getDefaultDisplay();
dis... | java | private static Point getScreenSize(Context context, Point p) {
if (p == null) {
p = new Point();
}
WindowManager windowManager = (WindowManager) context
.getSystemService(Context.WINDOW_SERVICE);
Display display = windowManager.getDefaultDisplay();
dis... | [
"private",
"static",
"Point",
"getScreenSize",
"(",
"Context",
"context",
",",
"Point",
"p",
")",
"{",
"if",
"(",
"p",
"==",
"null",
")",
"{",
"p",
"=",
"new",
"Point",
"(",
")",
";",
"}",
"WindowManager",
"windowManager",
"=",
"(",
"WindowManager",
")... | Returns screen height and width
@param context
Any non-null Android Context
@param p
Optional Point to reuse. If null, a new Point will be created.
@return .x is screen width; .y is screen height. | [
"Returns",
"screen",
"height",
"and",
"width"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/asynchronous/AsyncBitmapTexture.java#L229-L238 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMatrix4f.java | AiMatrix4f.get | public float get(int row, int col) {
if (row < 0 || row > 3) {
throw new IndexOutOfBoundsException("Index: " + row + ", Size: 4");
}
if (col < 0 || col > 3) {
throw new IndexOutOfBoundsException("Index: " + col + ", Size: 4");
}
return m_data[row * 4 + co... | java | public float get(int row, int col) {
if (row < 0 || row > 3) {
throw new IndexOutOfBoundsException("Index: " + row + ", Size: 4");
}
if (col < 0 || col > 3) {
throw new IndexOutOfBoundsException("Index: " + col + ", Size: 4");
}
return m_data[row * 4 + co... | [
"public",
"float",
"get",
"(",
"int",
"row",
",",
"int",
"col",
")",
"{",
"if",
"(",
"row",
"<",
"0",
"||",
"row",
">",
"3",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"\"Index: \"",
"+",
"row",
"+",
"\", Size: 4\"",
")",
";",
"}",
... | Gets an element of the matrix.
@param row
the row
@param col
the column
@return the element at the given position | [
"Gets",
"an",
"element",
"of",
"the",
"matrix",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMatrix4f.java#L81-L90 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/periodic/GVRPeriodicEngine.java | GVRPeriodicEngine.runAfter | public PeriodicEvent runAfter(Runnable task, float delay) {
validateDelay(delay);
return new Event(task, delay);
} | java | public PeriodicEvent runAfter(Runnable task, float delay) {
validateDelay(delay);
return new Event(task, delay);
} | [
"public",
"PeriodicEvent",
"runAfter",
"(",
"Runnable",
"task",
",",
"float",
"delay",
")",
"{",
"validateDelay",
"(",
"delay",
")",
";",
"return",
"new",
"Event",
"(",
"task",
",",
"delay",
")",
";",
"}"
] | Run a task once, after a delay.
@param task
Task to run.
@param delay
Unit is seconds.
@return An interface that lets you query the status; cancel; or
reschedule the event. | [
"Run",
"a",
"task",
"once",
"after",
"a",
"delay",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/periodic/GVRPeriodicEngine.java#L120-L123 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/periodic/GVRPeriodicEngine.java | GVRPeriodicEngine.runEvery | public PeriodicEvent runEvery(Runnable task, float delay, float period) {
return runEvery(task, delay, period, null);
} | java | public PeriodicEvent runEvery(Runnable task, float delay, float period) {
return runEvery(task, delay, period, null);
} | [
"public",
"PeriodicEvent",
"runEvery",
"(",
"Runnable",
"task",
",",
"float",
"delay",
",",
"float",
"period",
")",
"{",
"return",
"runEvery",
"(",
"task",
",",
"delay",
",",
"period",
",",
"null",
")",
";",
"}"
] | Run a task periodically and indefinitely.
@param task
Task to run.
@param delay
The first execution will happen in {@code delay} seconds.
@param period
Subsequent executions will happen every {@code period} seconds
after the first.
@return An interface that lets you query the status; cancel; or
reschedule the event. | [
"Run",
"a",
"task",
"periodically",
"and",
"indefinitely",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/periodic/GVRPeriodicEngine.java#L138-L140 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/periodic/GVRPeriodicEngine.java | GVRPeriodicEngine.runEvery | public PeriodicEvent runEvery(Runnable task, float delay, float period,
int repetitions) {
if (repetitions < 1) {
return null;
} else if (repetitions == 1) {
// Better to burn a handful of CPU cycles than to churn memory by
// creating a new callback
... | java | public PeriodicEvent runEvery(Runnable task, float delay, float period,
int repetitions) {
if (repetitions < 1) {
return null;
} else if (repetitions == 1) {
// Better to burn a handful of CPU cycles than to churn memory by
// creating a new callback
... | [
"public",
"PeriodicEvent",
"runEvery",
"(",
"Runnable",
"task",
",",
"float",
"delay",
",",
"float",
"period",
",",
"int",
"repetitions",
")",
"{",
"if",
"(",
"repetitions",
"<",
"1",
")",
"{",
"return",
"null",
";",
"}",
"else",
"if",
"(",
"repetitions"... | Run a task periodically, for a set number of times.
@param task
Task to run.
@param delay
The first execution will happen in {@code delay} seconds.
@param period
Subsequent executions will happen every {@code period} seconds
after the first.
@param repetitions
Repeat count
@return {@code null} if {@code repetitions < ... | [
"Run",
"a",
"task",
"periodically",
"for",
"a",
"set",
"number",
"of",
"times",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/periodic/GVRPeriodicEngine.java#L157-L168 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/periodic/GVRPeriodicEngine.java | GVRPeriodicEngine.runEvery | public PeriodicEvent runEvery(Runnable task, float delay, float period,
KeepRunning callback) {
validateDelay(delay);
validatePeriod(period);
return new Event(task, delay, period, callback);
} | java | public PeriodicEvent runEvery(Runnable task, float delay, float period,
KeepRunning callback) {
validateDelay(delay);
validatePeriod(period);
return new Event(task, delay, period, callback);
} | [
"public",
"PeriodicEvent",
"runEvery",
"(",
"Runnable",
"task",
",",
"float",
"delay",
",",
"float",
"period",
",",
"KeepRunning",
"callback",
")",
"{",
"validateDelay",
"(",
"delay",
")",
";",
"validatePeriod",
"(",
"period",
")",
";",
"return",
"new",
"Eve... | Run a task periodically, with a callback.
@param task
Task to run.
@param delay
The first execution will happen in {@code delay} seconds.
@param period
Subsequent executions will happen every {@code period} seconds
after the first.
@param callback
Callback that lets you cancel the task. {@code null} means run
indefini... | [
"Run",
"a",
"task",
"periodically",
"with",
"a",
"callback",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/periodic/GVRPeriodicEngine.java#L186-L191 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiScene.java | AiScene.getSceneRoot | @SuppressWarnings("unchecked")
public <V3, M4, C, N, Q> N getSceneRoot(AiWrapperProvider<V3, M4, C, N, Q>
wrapperProvider) {
return (N) m_sceneRoot;
} | java | @SuppressWarnings("unchecked")
public <V3, M4, C, N, Q> N getSceneRoot(AiWrapperProvider<V3, M4, C, N, Q>
wrapperProvider) {
return (N) m_sceneRoot;
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"V3",
",",
"M4",
",",
"C",
",",
"N",
",",
"Q",
">",
"N",
"getSceneRoot",
"(",
"AiWrapperProvider",
"<",
"V3",
",",
"M4",
",",
"C",
",",
"N",
",",
"Q",
">",
"wrapperProvider",
")",
"... | Returns the scene graph root.
This method is part of the wrapped API (see {@link AiWrapperProvider}
for details on wrappers).<p>
The built-in behavior is to return a {@link AiVector}.
@param wrapperProvider the wrapper provider (used for type inference)
@return the scene graph root | [
"Returns",
"the",
"scene",
"graph",
"root",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiScene.java#L227-L232 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java | Widget.enableClipRegion | public void enableClipRegion() {
if (mClippingEnabled) {
Log.w(TAG, "Clipping has been enabled already for %s!", getName());
return;
}
Log.d(Log.SUBSYSTEM.WIDGET, TAG, "enableClipping for %s [%f, %f, %f]",
getName(), getViewPortWidth(), getViewPortHeight()... | java | public void enableClipRegion() {
if (mClippingEnabled) {
Log.w(TAG, "Clipping has been enabled already for %s!", getName());
return;
}
Log.d(Log.SUBSYSTEM.WIDGET, TAG, "enableClipping for %s [%f, %f, %f]",
getName(), getViewPortWidth(), getViewPortHeight()... | [
"public",
"void",
"enableClipRegion",
"(",
")",
"{",
"if",
"(",
"mClippingEnabled",
")",
"{",
"Log",
".",
"w",
"(",
"TAG",
",",
"\"Clipping has been enabled already for %s!\"",
",",
"getName",
"(",
")",
")",
";",
"return",
";",
"}",
"Log",
".",
"d",
"(",
... | Enable clipping for the Widget. Widget content including its children will be clipped by a
rectangular View Port. By default clipping is disabled. | [
"Enable",
"clipping",
"for",
"the",
"Widget",
".",
"Widget",
"content",
"including",
"its",
"children",
"will",
"be",
"clipped",
"by",
"a",
"rectangular",
"View",
"Port",
".",
"By",
"default",
"clipping",
"is",
"disabled",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L884-L910 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java | Widget.getLayoutSize | public float getLayoutSize(final Layout.Axis axis) {
float size = 0;
for (Layout layout : mLayouts) {
size = Math.max(size, layout.getSize(axis));
}
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "getLayoutSize [%s] axis [%s] size [%f]", getName(), axis, size);
return size;
} | java | public float getLayoutSize(final Layout.Axis axis) {
float size = 0;
for (Layout layout : mLayouts) {
size = Math.max(size, layout.getSize(axis));
}
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "getLayoutSize [%s] axis [%s] size [%f]", getName(), axis, size);
return size;
} | [
"public",
"float",
"getLayoutSize",
"(",
"final",
"Layout",
".",
"Axis",
"axis",
")",
"{",
"float",
"size",
"=",
"0",
";",
"for",
"(",
"Layout",
"layout",
":",
"mLayouts",
")",
"{",
"size",
"=",
"Math",
".",
"max",
"(",
"size",
",",
"layout",
".",
... | Gets Widget layout dimension
@param axis The {@linkplain Layout.Axis axis} to obtain layout size for
@return dimension | [
"Gets",
"Widget",
"layout",
"dimension"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L992-L999 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java | Widget.getBoundsWidth | public float getBoundsWidth() {
if (mSceneObject != null) {
GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume();
return v.maxCorner.x - v.minCorner.x;
}
return 0f;
} | java | public float getBoundsWidth() {
if (mSceneObject != null) {
GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume();
return v.maxCorner.x - v.minCorner.x;
}
return 0f;
} | [
"public",
"float",
"getBoundsWidth",
"(",
")",
"{",
"if",
"(",
"mSceneObject",
"!=",
"null",
")",
"{",
"GVRSceneObject",
".",
"BoundingVolume",
"v",
"=",
"mSceneObject",
".",
"getBoundingVolume",
"(",
")",
";",
"return",
"v",
".",
"maxCorner",
".",
"x",
"-... | Gets Widget bounds width
@return width | [
"Gets",
"Widget",
"bounds",
"width"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L1035-L1041 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java | Widget.getBoundsHeight | public float getBoundsHeight(){
if (mSceneObject != null) {
GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume();
return v.maxCorner.y - v.minCorner.y;
}
return 0f;
} | java | public float getBoundsHeight(){
if (mSceneObject != null) {
GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume();
return v.maxCorner.y - v.minCorner.y;
}
return 0f;
} | [
"public",
"float",
"getBoundsHeight",
"(",
")",
"{",
"if",
"(",
"mSceneObject",
"!=",
"null",
")",
"{",
"GVRSceneObject",
".",
"BoundingVolume",
"v",
"=",
"mSceneObject",
".",
"getBoundingVolume",
"(",
")",
";",
"return",
"v",
".",
"maxCorner",
".",
"y",
"... | Gets Widget bounds height
@return height | [
"Gets",
"Widget",
"bounds",
"height"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L1047-L1053 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java | Widget.getBoundsDepth | public float getBoundsDepth() {
if (mSceneObject != null) {
GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume();
return v.maxCorner.z - v.minCorner.z;
}
return 0f;
} | java | public float getBoundsDepth() {
if (mSceneObject != null) {
GVRSceneObject.BoundingVolume v = mSceneObject.getBoundingVolume();
return v.maxCorner.z - v.minCorner.z;
}
return 0f;
} | [
"public",
"float",
"getBoundsDepth",
"(",
")",
"{",
"if",
"(",
"mSceneObject",
"!=",
"null",
")",
"{",
"GVRSceneObject",
".",
"BoundingVolume",
"v",
"=",
"mSceneObject",
".",
"getBoundingVolume",
"(",
")",
";",
"return",
"v",
".",
"maxCorner",
".",
"z",
"-... | Gets Widget bounds depth
@return depth | [
"Gets",
"Widget",
"bounds",
"depth"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L1059-L1065 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java | Widget.rotateWithPivot | public void rotateWithPivot(float w, float x, float y, float z,
float pivotX, float pivotY, float pivotZ) {
getTransform().rotateWithPivot(w, x, y, z, pivotX, pivotY, pivotZ);
if (mTransformCache.rotateWithPivot(w, x, y, z, pivotX, pivotY, pivotZ)) {
onTransformChanged();
... | java | public void rotateWithPivot(float w, float x, float y, float z,
float pivotX, float pivotY, float pivotZ) {
getTransform().rotateWithPivot(w, x, y, z, pivotX, pivotY, pivotZ);
if (mTransformCache.rotateWithPivot(w, x, y, z, pivotX, pivotY, pivotZ)) {
onTransformChanged();
... | [
"public",
"void",
"rotateWithPivot",
"(",
"float",
"w",
",",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
",",
"float",
"pivotX",
",",
"float",
"pivotY",
",",
"float",
"pivotZ",
")",
"{",
"getTransform",
"(",
")",
".",
"rotateWithPivot",
"(",
"w... | Modify the tranform's current rotation in quaternion terms, around a
pivot other than the origin.
@param w
'W' component of the quaternion.
@param x
'X' component of the quaternion.
@param y
'Y' component of the quaternion.
@param z
'Z' component of the quaternion.
@param pivotX
'X' component of the pivot's location.
... | [
"Modify",
"the",
"tranform",
"s",
"current",
"rotation",
"in",
"quaternion",
"terms",
"around",
"a",
"pivot",
"other",
"than",
"the",
"origin",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L1618-L1624 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java | Widget.setVisibility | public boolean setVisibility(final Visibility visibility) {
if (visibility != mVisibility) {
Log.d(Log.SUBSYSTEM.WIDGET, TAG, "setVisibility(%s) for %s", visibility, getName());
updateVisibility(visibility);
mVisibility = visibility;
return true;
}
... | java | public boolean setVisibility(final Visibility visibility) {
if (visibility != mVisibility) {
Log.d(Log.SUBSYSTEM.WIDGET, TAG, "setVisibility(%s) for %s", visibility, getName());
updateVisibility(visibility);
mVisibility = visibility;
return true;
}
... | [
"public",
"boolean",
"setVisibility",
"(",
"final",
"Visibility",
"visibility",
")",
"{",
"if",
"(",
"visibility",
"!=",
"mVisibility",
")",
"{",
"Log",
".",
"d",
"(",
"Log",
".",
"SUBSYSTEM",
".",
"WIDGET",
",",
"TAG",
",",
"\"setVisibility(%s) for %s\"",
"... | Set the visibility of the object.
@see Visibility
@param visibility
The visibility of the object.
@return {@code true} if the visibility was changed, {@code false} if it
wasn't. | [
"Set",
"the",
"visibility",
"of",
"the",
"object",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L1768-L1776 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java | Widget.setViewPortVisibility | public boolean setViewPortVisibility(final ViewPortVisibility viewportVisibility) {
boolean visibilityIsChanged = viewportVisibility != mIsVisibleInViewPort;
if (visibilityIsChanged) {
Visibility visibility = mVisibility;
switch(viewportVisibility) {
case FULLY_V... | java | public boolean setViewPortVisibility(final ViewPortVisibility viewportVisibility) {
boolean visibilityIsChanged = viewportVisibility != mIsVisibleInViewPort;
if (visibilityIsChanged) {
Visibility visibility = mVisibility;
switch(viewportVisibility) {
case FULLY_V... | [
"public",
"boolean",
"setViewPortVisibility",
"(",
"final",
"ViewPortVisibility",
"viewportVisibility",
")",
"{",
"boolean",
"visibilityIsChanged",
"=",
"viewportVisibility",
"!=",
"mIsVisibleInViewPort",
";",
"if",
"(",
"visibilityIsChanged",
")",
"{",
"Visibility",
"vis... | Set ViewPort visibility of the object.
@see ViewPortVisibility
@param viewportVisibility
The ViewPort visibility of the object.
@return {@code true} if the ViewPort visibility was changed, {@code false} if it
wasn't. | [
"Set",
"ViewPort",
"visibility",
"of",
"the",
"object",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L1809-L1828 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java | Widget.findChildByName | public Widget findChildByName(final String name) {
final List<Widget> groups = new ArrayList<>();
groups.add(this);
return findChildByNameInAllGroups(name, groups);
} | java | public Widget findChildByName(final String name) {
final List<Widget> groups = new ArrayList<>();
groups.add(this);
return findChildByNameInAllGroups(name, groups);
} | [
"public",
"Widget",
"findChildByName",
"(",
"final",
"String",
"name",
")",
"{",
"final",
"List",
"<",
"Widget",
">",
"groups",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"groups",
".",
"add",
"(",
"this",
")",
";",
"return",
"findChildByNameInAllGroups... | Finds the Widget in hierarchy
@param name Name of the child to find
@return The named child {@link Widget} or {@code null} if not found. | [
"Finds",
"the",
"Widget",
"in",
"hierarchy"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L1974-L1979 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java | Widget.isGLThread | protected final boolean isGLThread() {
final Thread glThread = sGLThread.get();
return glThread != null && glThread.equals(Thread.currentThread());
} | java | protected final boolean isGLThread() {
final Thread glThread = sGLThread.get();
return glThread != null && glThread.equals(Thread.currentThread());
} | [
"protected",
"final",
"boolean",
"isGLThread",
"(",
")",
"{",
"final",
"Thread",
"glThread",
"=",
"sGLThread",
".",
"get",
"(",
")",
";",
"return",
"glThread",
"!=",
"null",
"&&",
"glThread",
".",
"equals",
"(",
"Thread",
".",
"currentThread",
"(",
")",
... | Determine whether the calling thread is the GL thread.
@return {@code True} if called from the GL thread, {@code false} if
called from another thread. | [
"Determine",
"whether",
"the",
"calling",
"thread",
"is",
"the",
"GL",
"thread",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L3643-L3646 | train |
Samsung/GearVRf | GVRf/Extensions/MixedReality/src/main/java/org/gearvrf/mixedreality/arcore/ARCoreAnchor.java | ARCoreAnchor.update | protected void update(float scale) {
// Updates only when the plane is in the scene
GVRSceneObject owner = getOwnerObject();
if ((owner != null) && isEnabled() && owner.isEnabled())
{
convertFromARtoVRSpace(scale);
}
} | java | protected void update(float scale) {
// Updates only when the plane is in the scene
GVRSceneObject owner = getOwnerObject();
if ((owner != null) && isEnabled() && owner.isEnabled())
{
convertFromARtoVRSpace(scale);
}
} | [
"protected",
"void",
"update",
"(",
"float",
"scale",
")",
"{",
"// Updates only when the plane is in the scene",
"GVRSceneObject",
"owner",
"=",
"getOwnerObject",
"(",
")",
";",
"if",
"(",
"(",
"owner",
"!=",
"null",
")",
"&&",
"isEnabled",
"(",
")",
"&&",
"o... | Update the anchor based on arcore best knowledge of the world
@param scale | [
"Update",
"the",
"anchor",
"based",
"on",
"arcore",
"best",
"knowledge",
"of",
"the",
"world"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/MixedReality/src/main/java/org/gearvrf/mixedreality/arcore/ARCoreAnchor.java#L85-L93 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRDirectLight.java | GVRDirectLight.setCastShadow | public void setCastShadow(boolean enableFlag)
{
GVRSceneObject owner = getOwnerObject();
if (owner != null)
{
GVRShadowMap shadowMap = (GVRShadowMap) getComponent(GVRRenderTarget.getComponentType());
if (enableFlag)
{
if (shadowMap != null... | java | public void setCastShadow(boolean enableFlag)
{
GVRSceneObject owner = getOwnerObject();
if (owner != null)
{
GVRShadowMap shadowMap = (GVRShadowMap) getComponent(GVRRenderTarget.getComponentType());
if (enableFlag)
{
if (shadowMap != null... | [
"public",
"void",
"setCastShadow",
"(",
"boolean",
"enableFlag",
")",
"{",
"GVRSceneObject",
"owner",
"=",
"getOwnerObject",
"(",
")",
";",
"if",
"(",
"owner",
"!=",
"null",
")",
"{",
"GVRShadowMap",
"shadowMap",
"=",
"(",
"GVRShadowMap",
")",
"getComponent",
... | Enables or disabled shadow casting for a direct light.
Enabling shadows attaches a GVRShadowMap component to the
GVRSceneObject which owns the light and provides the
component with an orthographic camera for shadow casting.
@param enableFlag true to enable shadow casting, false to disable | [
"Enables",
"or",
"disabled",
"shadow",
"casting",
"for",
"a",
"direct",
"light",
".",
"Enabling",
"shadows",
"attaches",
"a",
"GVRShadowMap",
"component",
"to",
"the",
"GVRSceneObject",
"which",
"owns",
"the",
"light",
"and",
"provides",
"the",
"component",
"wit... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRDirectLight.java#L201-L228 | train |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/javascript/ExternalScriptable.java | ExternalScriptable.delete | public synchronized void delete(String name) {
if (isEmpty(name)) {
indexedProps.remove(name);
} else {
synchronized (context) {
int scope = context.getAttributesScope(name);
if (scope != -1) {
context.removeAttribute(name, scop... | java | public synchronized void delete(String name) {
if (isEmpty(name)) {
indexedProps.remove(name);
} else {
synchronized (context) {
int scope = context.getAttributesScope(name);
if (scope != -1) {
context.removeAttribute(name, scop... | [
"public",
"synchronized",
"void",
"delete",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"name",
")",
")",
"{",
"indexedProps",
".",
"remove",
"(",
"name",
")",
";",
"}",
"else",
"{",
"synchronized",
"(",
"context",
")",
"{",
"int",
"s... | Removes a named property from the object.
If the property is not found, no action is taken.
@param name the name of the property | [
"Removes",
"a",
"named",
"property",
"from",
"the",
"object",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/javascript/ExternalScriptable.java#L217-L228 | train |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/javascript/ExternalScriptable.java | ExternalScriptable.getIds | public synchronized Object[] getIds() {
String[] keys = getAllKeys();
int size = keys.length + indexedProps.size();
Object[] res = new Object[size];
System.arraycopy(keys, 0, res, 0, keys.length);
int i = keys.length;
// now add all indexed properties
for (Object ... | java | public synchronized Object[] getIds() {
String[] keys = getAllKeys();
int size = keys.length + indexedProps.size();
Object[] res = new Object[size];
System.arraycopy(keys, 0, res, 0, keys.length);
int i = keys.length;
// now add all indexed properties
for (Object ... | [
"public",
"synchronized",
"Object",
"[",
"]",
"getIds",
"(",
")",
"{",
"String",
"[",
"]",
"keys",
"=",
"getAllKeys",
"(",
")",
";",
"int",
"size",
"=",
"keys",
".",
"length",
"+",
"indexedProps",
".",
"size",
"(",
")",
";",
"Object",
"[",
"]",
"re... | Get an array of property ids.
Not all property ids need be returned. Those properties
whose ids are not returned are considered non-enumerable.
@return an array of Objects. Each entry in the array is either
a java.lang.String or a java.lang.Number | [
"Get",
"an",
"array",
"of",
"property",
"ids",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/javascript/ExternalScriptable.java#L282-L293 | train |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/javascript/ExternalScriptable.java | ExternalScriptable.hasInstance | public boolean hasInstance(Scriptable instance) {
// Default for JS objects (other than Function) is to do prototype
// chasing.
Scriptable proto = instance.getPrototype();
while (proto != null) {
if (proto.equals(this)) return true;
proto = proto.getPrototype();
... | java | public boolean hasInstance(Scriptable instance) {
// Default for JS objects (other than Function) is to do prototype
// chasing.
Scriptable proto = instance.getPrototype();
while (proto != null) {
if (proto.equals(this)) return true;
proto = proto.getPrototype();
... | [
"public",
"boolean",
"hasInstance",
"(",
"Scriptable",
"instance",
")",
"{",
"// Default for JS objects (other than Function) is to do prototype",
"// chasing.",
"Scriptable",
"proto",
"=",
"instance",
".",
"getPrototype",
"(",
")",
";",
"while",
"(",
"proto",
"!=",
"nu... | Implements the instanceof operator.
@param instance The value that appeared on the LHS of the instanceof
operator
@return true if "this" appears in value's prototype chain | [
"Implements",
"the",
"instanceof",
"operator",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/javascript/ExternalScriptable.java#L400-L409 | train |
Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/TimeSensor.java | TimeSensor.setLoop | public void setLoop(boolean doLoop, GVRContext gvrContext) {
if (this.loop != doLoop ) {
// a change in the loop
for (GVRNodeAnimation gvrKeyFrameAnimation : gvrKeyFrameAnimations) {
if (doLoop) gvrKeyFrameAnimation.setRepeatMode(GVRRepeatMode.REPEATED);
e... | java | public void setLoop(boolean doLoop, GVRContext gvrContext) {
if (this.loop != doLoop ) {
// a change in the loop
for (GVRNodeAnimation gvrKeyFrameAnimation : gvrKeyFrameAnimations) {
if (doLoop) gvrKeyFrameAnimation.setRepeatMode(GVRRepeatMode.REPEATED);
e... | [
"public",
"void",
"setLoop",
"(",
"boolean",
"doLoop",
",",
"GVRContext",
"gvrContext",
")",
"{",
"if",
"(",
"this",
".",
"loop",
"!=",
"doLoop",
")",
"{",
"// a change in the loop",
"for",
"(",
"GVRNodeAnimation",
"gvrKeyFrameAnimation",
":",
"gvrKeyFrameAnimatio... | SetLoop will either set the GVRNodeAnimation's Repeat Mode to REPEATED if loop is true.
or it will set the GVRNodeAnimation's Repeat Mode to ONCE if loop is false
if loop is set to TRUE, when it was previously FALSE, then start the Animation.
@param doLoop
@param gvrContext | [
"SetLoop",
"will",
"either",
"set",
"the",
"GVRNodeAnimation",
"s",
"Repeat",
"Mode",
"to",
"REPEATED",
"if",
"loop",
"is",
"true",
".",
"or",
"it",
"will",
"set",
"the",
"GVRNodeAnimation",
"s",
"Repeat",
"Mode",
"to",
"ONCE",
"if",
"loop",
"is",
"false",... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/TimeSensor.java#L96-L111 | train |
Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/TimeSensor.java | TimeSensor.setCycleInterval | public void setCycleInterval(float newCycleInterval) {
if ( (this.cycleInterval != newCycleInterval) && (newCycleInterval > 0) ) {
for (GVRNodeAnimation gvrKeyFrameAnimation : gvrKeyFrameAnimations) {
//TODO Cannot easily change the GVRAnimation's GVRChannel once set.
}
... | java | public void setCycleInterval(float newCycleInterval) {
if ( (this.cycleInterval != newCycleInterval) && (newCycleInterval > 0) ) {
for (GVRNodeAnimation gvrKeyFrameAnimation : gvrKeyFrameAnimations) {
//TODO Cannot easily change the GVRAnimation's GVRChannel once set.
}
... | [
"public",
"void",
"setCycleInterval",
"(",
"float",
"newCycleInterval",
")",
"{",
"if",
"(",
"(",
"this",
".",
"cycleInterval",
"!=",
"newCycleInterval",
")",
"&&",
"(",
"newCycleInterval",
">",
"0",
")",
")",
"{",
"for",
"(",
"GVRNodeAnimation",
"gvrKeyFrameA... | Set the TimeSensor's cycleInterval property
Currently, this does not change the duration of the animation.
@param newCycleInterval | [
"Set",
"the",
"TimeSensor",
"s",
"cycleInterval",
"property",
"Currently",
"this",
"does",
"not",
"change",
"the",
"duration",
"of",
"the",
"animation",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/TimeSensor.java#L126-L133 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/ExecutionChain.java | ExecutionChain.setErrorCallback | public ExecutionChain setErrorCallback(ErrorCallback callback) {
if (state.get() == State.RUNNING) {
throw new IllegalStateException(
"Invalid while ExecutionChain is running");
}
errorCallback = callback;
return this;
} | java | public ExecutionChain setErrorCallback(ErrorCallback callback) {
if (state.get() == State.RUNNING) {
throw new IllegalStateException(
"Invalid while ExecutionChain is running");
}
errorCallback = callback;
return this;
} | [
"public",
"ExecutionChain",
"setErrorCallback",
"(",
"ErrorCallback",
"callback",
")",
"{",
"if",
"(",
"state",
".",
"get",
"(",
")",
"==",
"State",
".",
"RUNNING",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Invalid while ExecutionChain is running\""... | Set a callback to handle any exceptions in the chain of execution.
@param callback
Instance of {@link ErrorCallback}.
@return Reference to the {@code ExecutionChain}
@throws IllegalStateException
if the chain of execution has already been {@link #execute()
started}. | [
"Set",
"a",
"callback",
"to",
"handle",
"any",
"exceptions",
"in",
"the",
"chain",
"of",
"execution",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/ExecutionChain.java#L381-L388 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/ExecutionChain.java | ExecutionChain.execute | public void execute() {
State currentState = state.getAndSet(State.RUNNING);
if (currentState == State.RUNNING) {
throw new IllegalStateException(
"ExecutionChain is already running!");
}
executeRunnable = new ExecuteRunnable();
} | java | public void execute() {
State currentState = state.getAndSet(State.RUNNING);
if (currentState == State.RUNNING) {
throw new IllegalStateException(
"ExecutionChain is already running!");
}
executeRunnable = new ExecuteRunnable();
} | [
"public",
"void",
"execute",
"(",
")",
"{",
"State",
"currentState",
"=",
"state",
".",
"getAndSet",
"(",
"State",
".",
"RUNNING",
")",
";",
"if",
"(",
"currentState",
"==",
"State",
".",
"RUNNING",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
... | Start the chain of execution running.
@throws IllegalStateException
if the chain of execution has already been started. | [
"Start",
"the",
"chain",
"of",
"execution",
"running",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/ExecutionChain.java#L396-L403 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRConfigurationManager.java | GVRConfigurationManager.isHomeKeyPresent | public boolean isHomeKeyPresent() {
final GVRApplication application = mApplication.get();
if (null != application) {
final String model = getHmtModel();
if (null != model && model.contains("R323")) {
return true;
}
}
return false;
... | java | public boolean isHomeKeyPresent() {
final GVRApplication application = mApplication.get();
if (null != application) {
final String model = getHmtModel();
if (null != model && model.contains("R323")) {
return true;
}
}
return false;
... | [
"public",
"boolean",
"isHomeKeyPresent",
"(",
")",
"{",
"final",
"GVRApplication",
"application",
"=",
"mApplication",
".",
"get",
"(",
")",
";",
"if",
"(",
"null",
"!=",
"application",
")",
"{",
"final",
"String",
"model",
"=",
"getHmtModel",
"(",
")",
";... | Does the headset the device is docked into have a dedicated home key
@return | [
"Does",
"the",
"headset",
"the",
"device",
"is",
"docked",
"into",
"have",
"a",
"dedicated",
"home",
"key"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRConfigurationManager.java#L200-L209 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/Shell.java | Shell.addAuxHandler | public void addAuxHandler(Object handler, String prefix) {
if (handler == null) {
throw new NullPointerException();
}
auxHandlers.put(prefix, handler);
allHandlers.add(handler);
addDeclaredMethods(handler, prefix);
inputConverter.addDeclaredConverters(handler... | java | public void addAuxHandler(Object handler, String prefix) {
if (handler == null) {
throw new NullPointerException();
}
auxHandlers.put(prefix, handler);
allHandlers.add(handler);
addDeclaredMethods(handler, prefix);
inputConverter.addDeclaredConverters(handler... | [
"public",
"void",
"addAuxHandler",
"(",
"Object",
"handler",
",",
"String",
"prefix",
")",
"{",
"if",
"(",
"handler",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"auxHandlers",
".",
"put",
"(",
"prefix",
",",
"hand... | This method is very similar to addMainHandler, except ShellFactory
will pass all handlers registered with this method to all this shell's subshells.
@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)
@param handler Object which should be registered as handler.
@param prefix Prefix tha... | [
"This",
"method",
"is",
"very",
"similar",
"to",
"addMainHandler",
"except",
"ShellFactory",
"will",
"pass",
"all",
"handlers",
"registered",
"with",
"this",
"method",
"to",
"all",
"this",
"shell",
"s",
"subshells",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/Shell.java#L164-L178 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/Shell.java | Shell.commandLoop | public void commandLoop() throws IOException {
for (Object handler : allHandlers) {
if (handler instanceof ShellManageable) {
((ShellManageable)handler).cliEnterLoop();
}
}
output.output(appName, outputConverter);
String command = "";
while... | java | public void commandLoop() throws IOException {
for (Object handler : allHandlers) {
if (handler instanceof ShellManageable) {
((ShellManageable)handler).cliEnterLoop();
}
}
output.output(appName, outputConverter);
String command = "";
while... | [
"public",
"void",
"commandLoop",
"(",
")",
"throws",
"IOException",
"{",
"for",
"(",
"Object",
"handler",
":",
"allHandlers",
")",
"{",
"if",
"(",
"handler",
"instanceof",
"ShellManageable",
")",
"{",
"(",
"(",
"ShellManageable",
")",
"handler",
")",
".",
... | Runs the command session.
Create the Shell, then run this method to listen to the user,
and the Shell will invoke Handler's methods.
@throws java.io.IOException when can't readLine() from input. | [
"Runs",
"the",
"command",
"session",
".",
"Create",
"the",
"Shell",
"then",
"run",
"this",
"method",
"to",
"listen",
"to",
"the",
"user",
"and",
"the",
"Shell",
"will",
"invoke",
"Handler",
"s",
"methods",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/Shell.java#L224-L260 | train |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java | GVRScriptManager.addVariable | @Override
public void addVariable(String varName, Object value) {
synchronized (mGlobalVariables) {
mGlobalVariables.put(varName, value);
}
refreshGlobalBindings();
} | java | @Override
public void addVariable(String varName, Object value) {
synchronized (mGlobalVariables) {
mGlobalVariables.put(varName, value);
}
refreshGlobalBindings();
} | [
"@",
"Override",
"public",
"void",
"addVariable",
"(",
"String",
"varName",
",",
"Object",
"value",
")",
"{",
"synchronized",
"(",
"mGlobalVariables",
")",
"{",
"mGlobalVariables",
".",
"put",
"(",
"varName",
",",
"value",
")",
";",
"}",
"refreshGlobalBindings... | Add a variable to the scripting context.
@param varName The variable name.
@param value The variable value. | [
"Add",
"a",
"variable",
"to",
"the",
"scripting",
"context",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java#L172-L178 | train |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java | GVRScriptManager.attachScriptFile | @Override
public void attachScriptFile(IScriptable target, IScriptFile scriptFile) {
mScriptMap.put(target, scriptFile);
scriptFile.invokeFunction("onAttach", new Object[] { target });
} | java | @Override
public void attachScriptFile(IScriptable target, IScriptFile scriptFile) {
mScriptMap.put(target, scriptFile);
scriptFile.invokeFunction("onAttach", new Object[] { target });
} | [
"@",
"Override",
"public",
"void",
"attachScriptFile",
"(",
"IScriptable",
"target",
",",
"IScriptFile",
"scriptFile",
")",
"{",
"mScriptMap",
".",
"put",
"(",
"target",
",",
"scriptFile",
")",
";",
"scriptFile",
".",
"invokeFunction",
"(",
"\"onAttach\"",
",",
... | Attach a script file to a scriptable target.
@param target The scriptable target.
@param scriptFile The script file object. | [
"Attach",
"a",
"script",
"file",
"to",
"a",
"scriptable",
"target",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java#L186-L190 | train |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java | GVRScriptManager.detachScriptFile | @Override
public void detachScriptFile(IScriptable target) {
IScriptFile scriptFile = mScriptMap.remove(target);
if (scriptFile != null) {
scriptFile.invokeFunction("onDetach", new Object[] { target });
}
} | java | @Override
public void detachScriptFile(IScriptable target) {
IScriptFile scriptFile = mScriptMap.remove(target);
if (scriptFile != null) {
scriptFile.invokeFunction("onDetach", new Object[] { target });
}
} | [
"@",
"Override",
"public",
"void",
"detachScriptFile",
"(",
"IScriptable",
"target",
")",
"{",
"IScriptFile",
"scriptFile",
"=",
"mScriptMap",
".",
"remove",
"(",
"target",
")",
";",
"if",
"(",
"scriptFile",
"!=",
"null",
")",
"{",
"scriptFile",
".",
"invoke... | Detach any script file from a scriptable target.
@param target The scriptable target. | [
"Detach",
"any",
"script",
"file",
"from",
"a",
"scriptable",
"target",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java#L197-L203 | train |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java | GVRScriptManager.bindScriptBundleToScene | public void bindScriptBundleToScene(GVRScriptBundle scriptBundle, GVRScene scene) throws IOException, GVRScriptException {
for (GVRSceneObject sceneObject : scene.getSceneObjects()) {
bindBundleToSceneObject(scriptBundle, sceneObject);
}
} | java | public void bindScriptBundleToScene(GVRScriptBundle scriptBundle, GVRScene scene) throws IOException, GVRScriptException {
for (GVRSceneObject sceneObject : scene.getSceneObjects()) {
bindBundleToSceneObject(scriptBundle, sceneObject);
}
} | [
"public",
"void",
"bindScriptBundleToScene",
"(",
"GVRScriptBundle",
"scriptBundle",
",",
"GVRScene",
"scene",
")",
"throws",
"IOException",
",",
"GVRScriptException",
"{",
"for",
"(",
"GVRSceneObject",
"sceneObject",
":",
"scene",
".",
"getSceneObjects",
"(",
")",
... | Binds a script bundle to a scene.
@param scriptBundle
The {@code GVRScriptBundle} object containing script binding information.
@param scene
The scene to bind to.
@throws IOException if script bundle file cannot be read.
@throws GVRScriptException if script processing error occurs. | [
"Binds",
"a",
"script",
"bundle",
"to",
"a",
"scene",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java#L313-L317 | train |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java | GVRScriptManager.bindBundleToSceneObject | public void bindBundleToSceneObject(GVRScriptBundle scriptBundle, GVRSceneObject rootSceneObject)
throws IOException, GVRScriptException
{
bindHelper(scriptBundle, rootSceneObject, BIND_MASK_SCENE_OBJECTS);
} | java | public void bindBundleToSceneObject(GVRScriptBundle scriptBundle, GVRSceneObject rootSceneObject)
throws IOException, GVRScriptException
{
bindHelper(scriptBundle, rootSceneObject, BIND_MASK_SCENE_OBJECTS);
} | [
"public",
"void",
"bindBundleToSceneObject",
"(",
"GVRScriptBundle",
"scriptBundle",
",",
"GVRSceneObject",
"rootSceneObject",
")",
"throws",
"IOException",
",",
"GVRScriptException",
"{",
"bindHelper",
"(",
"scriptBundle",
",",
"rootSceneObject",
",",
"BIND_MASK_SCENE_OBJE... | Binds a script bundle to scene graph rooted at a scene object.
@param scriptBundle
The {@code GVRScriptBundle} object containing script binding information.
@param rootSceneObject
The root of the scene object tree to which the scripts are bound.
@throws IOException if script bundle file cannot be read.
@throws GVRScrip... | [
"Binds",
"a",
"script",
"bundle",
"to",
"scene",
"graph",
"rooted",
"at",
"a",
"scene",
"object",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java#L328-L332 | train |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java | GVRScriptManager.bindHelper | protected void bindHelper(GVRScriptBundle scriptBundle, GVRSceneObject rootSceneObject, int bindMask)
throws IOException, GVRScriptException
{
for (GVRScriptBindingEntry entry : scriptBundle.file.binding) {
GVRAndroidResource rc;
if (entry.volumeType == null || entry.volu... | java | protected void bindHelper(GVRScriptBundle scriptBundle, GVRSceneObject rootSceneObject, int bindMask)
throws IOException, GVRScriptException
{
for (GVRScriptBindingEntry entry : scriptBundle.file.binding) {
GVRAndroidResource rc;
if (entry.volumeType == null || entry.volu... | [
"protected",
"void",
"bindHelper",
"(",
"GVRScriptBundle",
"scriptBundle",
",",
"GVRSceneObject",
"rootSceneObject",
",",
"int",
"bindMask",
")",
"throws",
"IOException",
",",
"GVRScriptException",
"{",
"for",
"(",
"GVRScriptBindingEntry",
"entry",
":",
"scriptBundle",
... | Helper function to bind script bundler to various targets | [
"Helper",
"function",
"to",
"bind",
"script",
"bundler",
"to",
"various",
"targets"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java#L339-L393 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRViewManager.java | GVRViewManager.doMemoryManagementAndPerFrameCallbacks | private long doMemoryManagementAndPerFrameCallbacks() {
long currentTime = GVRTime.getCurrentTime();
mFrameTime = (currentTime - mPreviousTimeNanos) / 1e9f;
mPreviousTimeNanos = currentTime;
/*
* Without the sensor data, can't draw a scene properly.
*/
if (!(mS... | java | private long doMemoryManagementAndPerFrameCallbacks() {
long currentTime = GVRTime.getCurrentTime();
mFrameTime = (currentTime - mPreviousTimeNanos) / 1e9f;
mPreviousTimeNanos = currentTime;
/*
* Without the sensor data, can't draw a scene properly.
*/
if (!(mS... | [
"private",
"long",
"doMemoryManagementAndPerFrameCallbacks",
"(",
")",
"{",
"long",
"currentTime",
"=",
"GVRTime",
".",
"getCurrentTime",
"(",
")",
";",
"mFrameTime",
"=",
"(",
"currentTime",
"-",
"mPreviousTimeNanos",
")",
"/",
"1e9f",
";",
"mPreviousTimeNanos",
... | This is the code that needs to be executed before either eye is drawn.
@return Current time, from {@link GVRTime#getCurrentTime()} | [
"This",
"is",
"the",
"code",
"that",
"needs",
"to",
"be",
"executed",
"before",
"either",
"eye",
"is",
"drawn",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRViewManager.java#L258-L289 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRViewManager.java | GVRViewManager.capture3DScreenShot | protected void capture3DScreenShot(GVRRenderTarget renderTarget, boolean isMultiview) {
if (mScreenshot3DCallback == null) {
return;
}
final Bitmap[] bitmaps = new Bitmap[6];
renderSixCamerasAndReadback(mMainScene.getMainCameraRig(), bitmaps, renderTarget, isMultiview);
... | java | protected void capture3DScreenShot(GVRRenderTarget renderTarget, boolean isMultiview) {
if (mScreenshot3DCallback == null) {
return;
}
final Bitmap[] bitmaps = new Bitmap[6];
renderSixCamerasAndReadback(mMainScene.getMainCameraRig(), bitmaps, renderTarget, isMultiview);
... | [
"protected",
"void",
"capture3DScreenShot",
"(",
"GVRRenderTarget",
"renderTarget",
",",
"boolean",
"isMultiview",
")",
"{",
"if",
"(",
"mScreenshot3DCallback",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
"Bitmap",
"[",
"]",
"bitmaps",
"=",
"new",
"Bi... | capture 3D screenshot | [
"capture",
"3D",
"screenshot"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRViewManager.java#L665-L674 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRViewManager.java | GVRViewManager.captureEye | private void captureEye(GVRScreenshotCallback callback, GVRRenderTarget renderTarget, GVRViewManager.EYE eye, boolean useMultiview) {
if (null == callback) {
return;
}
readRenderResult(renderTarget,eye,useMultiview);
returnScreenshotToCaller(callback, mReadbackBufferWidth, mR... | java | private void captureEye(GVRScreenshotCallback callback, GVRRenderTarget renderTarget, GVRViewManager.EYE eye, boolean useMultiview) {
if (null == callback) {
return;
}
readRenderResult(renderTarget,eye,useMultiview);
returnScreenshotToCaller(callback, mReadbackBufferWidth, mR... | [
"private",
"void",
"captureEye",
"(",
"GVRScreenshotCallback",
"callback",
",",
"GVRRenderTarget",
"renderTarget",
",",
"GVRViewManager",
".",
"EYE",
"eye",
",",
"boolean",
"useMultiview",
")",
"{",
"if",
"(",
"null",
"==",
"callback",
")",
"{",
"return",
";",
... | capture screenshot of an eye | [
"capture",
"screenshot",
"of",
"an",
"eye"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRViewManager.java#L687-L693 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRViewManager.java | GVRViewManager.captureCenterEye | protected void captureCenterEye(GVRRenderTarget renderTarget, boolean isMultiview) {
if (mScreenshotCenterCallback == null) {
return;
}
// TODO: when we will use multithreading, create new camera using centercamera as we are adding posteffects into it
final GVRCamera centerC... | java | protected void captureCenterEye(GVRRenderTarget renderTarget, boolean isMultiview) {
if (mScreenshotCenterCallback == null) {
return;
}
// TODO: when we will use multithreading, create new camera using centercamera as we are adding posteffects into it
final GVRCamera centerC... | [
"protected",
"void",
"captureCenterEye",
"(",
"GVRRenderTarget",
"renderTarget",
",",
"boolean",
"isMultiview",
")",
"{",
"if",
"(",
"mScreenshotCenterCallback",
"==",
"null",
")",
"{",
"return",
";",
"}",
"// TODO: when we will use multithreading, create new camera using c... | capture center eye | [
"capture",
"center",
"eye"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRViewManager.java#L696-L740 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/MainThread.java | MainThread.runOnMainThreadNext | public boolean runOnMainThreadNext(Runnable r) {
assert handler != null;
if (!sanityCheck("runOnMainThreadNext " + r)) {
return false;
}
return handler.post(r);
} | java | public boolean runOnMainThreadNext(Runnable r) {
assert handler != null;
if (!sanityCheck("runOnMainThreadNext " + r)) {
return false;
}
return handler.post(r);
} | [
"public",
"boolean",
"runOnMainThreadNext",
"(",
"Runnable",
"r",
")",
"{",
"assert",
"handler",
"!=",
"null",
";",
"if",
"(",
"!",
"sanityCheck",
"(",
"\"runOnMainThreadNext \"",
"+",
"r",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"handler",
"... | Queues a Runnable to be run on the main thread on the next iteration of
the messaging loop. This is handy when code running on the main thread
needs to run something else on the main thread, but only after the
current code has finished executing.
@param r
The {@link Runnable} to run on the main thread.
@return Returns... | [
"Queues",
"a",
"Runnable",
"to",
"be",
"run",
"on",
"the",
"main",
"thread",
"on",
"the",
"next",
"iteration",
"of",
"the",
"messaging",
"loop",
".",
"This",
"is",
"handy",
"when",
"code",
"running",
"on",
"the",
"main",
"thread",
"needs",
"to",
"run",
... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/thread/MainThread.java#L123-L130 | train |
Samsung/GearVRf | GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java | CursorManager.showSettingsMenu | private void showSettingsMenu(final Cursor cursor) {
Log.d(TAG, "showSettingsMenu");
enableSettingsCursor(cursor);
context.runOnGlThread(new Runnable() {
@Override
public void run() {
new SettingsView(context, scene, CursorManager.this,
... | java | private void showSettingsMenu(final Cursor cursor) {
Log.d(TAG, "showSettingsMenu");
enableSettingsCursor(cursor);
context.runOnGlThread(new Runnable() {
@Override
public void run() {
new SettingsView(context, scene, CursorManager.this,
... | [
"private",
"void",
"showSettingsMenu",
"(",
"final",
"Cursor",
"cursor",
")",
"{",
"Log",
".",
"d",
"(",
"TAG",
",",
"\"showSettingsMenu\"",
")",
";",
"enableSettingsCursor",
"(",
"cursor",
")",
";",
"context",
".",
"runOnGlThread",
"(",
"new",
"Runnable",
"... | Presents the Cursor Settings to the User. Only works if scene is set. | [
"Presents",
"the",
"Cursor",
"Settings",
"to",
"the",
"User",
".",
"Only",
"works",
"if",
"scene",
"is",
"set",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java#L435-L461 | train |
Samsung/GearVRf | GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java | CursorManager.updateCursorsInScene | private void updateCursorsInScene(GVRScene scene, boolean add) {
synchronized (mCursors) {
for (Cursor cursor : mCursors) {
if (cursor.isActive()) {
if (add) {
addCursorToScene(cursor);
} else {
r... | java | private void updateCursorsInScene(GVRScene scene, boolean add) {
synchronized (mCursors) {
for (Cursor cursor : mCursors) {
if (cursor.isActive()) {
if (add) {
addCursorToScene(cursor);
} else {
r... | [
"private",
"void",
"updateCursorsInScene",
"(",
"GVRScene",
"scene",
",",
"boolean",
"add",
")",
"{",
"synchronized",
"(",
"mCursors",
")",
"{",
"for",
"(",
"Cursor",
"cursor",
":",
"mCursors",
")",
"{",
"if",
"(",
"cursor",
".",
"isActive",
"(",
")",
")... | Add or remove the active cursors from the provided scene.
@param scene The GVRScene.
@param add <code>true</code> for add, <code>false</code> to remove | [
"Add",
"or",
"remove",
"the",
"active",
"cursors",
"from",
"the",
"provided",
"scene",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java#L621-L633 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java | ListWidget.getAllViews | public List<Widget> getAllViews() {
List<Widget> views = new ArrayList<>();
for (Widget child: mContent.getChildren()) {
Widget item = ((ListItemHostWidget) child).getGuest();
if (item != null) {
views.add(item);
}
}
return views;
... | java | public List<Widget> getAllViews() {
List<Widget> views = new ArrayList<>();
for (Widget child: mContent.getChildren()) {
Widget item = ((ListItemHostWidget) child).getGuest();
if (item != null) {
views.add(item);
}
}
return views;
... | [
"public",
"List",
"<",
"Widget",
">",
"getAllViews",
"(",
")",
"{",
"List",
"<",
"Widget",
">",
"views",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Widget",
"child",
":",
"mContent",
".",
"getChildren",
"(",
")",
")",
"{",
"Widget",
... | Get all views from the list content
@return list of views currently visible | [
"Get",
"all",
"views",
"from",
"the",
"list",
"content"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java#L370-L379 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java | ListWidget.clearSelection | public boolean clearSelection(boolean requestLayout) {
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "clearSelection [%d]", mSelectedItemsList.size());
boolean updateLayout = false;
List<ListItemHostWidget> views = getAllHosts();
for (ListItemHostWidget host: views) {
if (host.isSelecte... | java | public boolean clearSelection(boolean requestLayout) {
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "clearSelection [%d]", mSelectedItemsList.size());
boolean updateLayout = false;
List<ListItemHostWidget> views = getAllHosts();
for (ListItemHostWidget host: views) {
if (host.isSelecte... | [
"public",
"boolean",
"clearSelection",
"(",
"boolean",
"requestLayout",
")",
"{",
"Log",
".",
"d",
"(",
"Log",
".",
"SUBSYSTEM",
".",
"LAYOUT",
",",
"TAG",
",",
"\"clearSelection [%d]\"",
",",
"mSelectedItemsList",
".",
"size",
"(",
")",
")",
";",
"boolean",... | Clear the selection of all items.
@param requestLayout request layout after clear selection if the flag is true, no layout
requested otherwise
@return {@code true} if at least one item was deselected,
{@code false} otherwise. | [
"Clear",
"the",
"selection",
"of",
"all",
"items",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java#L469-L485 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java | ListWidget.updateSelectedItemsList | public boolean updateSelectedItemsList(int dataIndex, boolean select) {
boolean done = false;
boolean contains = isSelected(dataIndex);
if (select) {
if (!contains) {
if (!mMultiSelectionSupported) {
clearSelection(false);
}
... | java | public boolean updateSelectedItemsList(int dataIndex, boolean select) {
boolean done = false;
boolean contains = isSelected(dataIndex);
if (select) {
if (!contains) {
if (!mMultiSelectionSupported) {
clearSelection(false);
}
... | [
"public",
"boolean",
"updateSelectedItemsList",
"(",
"int",
"dataIndex",
",",
"boolean",
"select",
")",
"{",
"boolean",
"done",
"=",
"false",
";",
"boolean",
"contains",
"=",
"isSelected",
"(",
"dataIndex",
")",
";",
"if",
"(",
"select",
")",
"{",
"if",
"(... | Update the selection state of the item
@param dataIndex data set index
@param select if it is true the item is marked as selected, otherwise - unselected
@return true if the selection state has been changed successfully, otherwise - false | [
"Update",
"the",
"selection",
"state",
"of",
"the",
"item"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java#L546-L566 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java | ListWidget.onScrollImpl | private void onScrollImpl(final Vector3Axis offset, final LayoutScroller.OnScrollListener listener) {
if (!isScrolling()) {
mScroller = new ScrollingProcessor(offset, listener);
mScroller.scroll();
}
} | java | private void onScrollImpl(final Vector3Axis offset, final LayoutScroller.OnScrollListener listener) {
if (!isScrolling()) {
mScroller = new ScrollingProcessor(offset, listener);
mScroller.scroll();
}
} | [
"private",
"void",
"onScrollImpl",
"(",
"final",
"Vector3Axis",
"offset",
",",
"final",
"LayoutScroller",
".",
"OnScrollListener",
"listener",
")",
"{",
"if",
"(",
"!",
"isScrolling",
"(",
")",
")",
"{",
"mScroller",
"=",
"new",
"ScrollingProcessor",
"(",
"off... | This method is called if the data set has been scrolled. | [
"This",
"method",
"is",
"called",
"if",
"the",
"data",
"set",
"has",
"been",
"scrolled",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java#L1184-L1189 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java | ListWidget.recycleChildren | protected void recycleChildren() {
for (ListItemHostWidget host: getAllHosts()) {
recycle(host);
}
mContent.onTransformChanged();
mContent.requestLayout();
} | java | protected void recycleChildren() {
for (ListItemHostWidget host: getAllHosts()) {
recycle(host);
}
mContent.onTransformChanged();
mContent.requestLayout();
} | [
"protected",
"void",
"recycleChildren",
"(",
")",
"{",
"for",
"(",
"ListItemHostWidget",
"host",
":",
"getAllHosts",
"(",
")",
")",
"{",
"recycle",
"(",
"host",
")",
";",
"}",
"mContent",
".",
"onTransformChanged",
"(",
")",
";",
"mContent",
".",
"requestL... | Recycle all views in the list. The host views might be reused for other data to
save resources on creating new widgets. | [
"Recycle",
"all",
"views",
"in",
"the",
"list",
".",
"The",
"host",
"views",
"might",
"be",
"reused",
"for",
"other",
"data",
"to",
"save",
"resources",
"on",
"creating",
"new",
"widgets",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java#L1228-L1234 | train |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java | ListWidget.onChangedImpl | private void onChangedImpl(final int preferableCenterPosition) {
for (ListOnChangedListener listener: mOnChangedListeners) {
listener.onChangedStart(this);
}
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "onChangedImpl(%s): items [%d] views [%d] mLayouts.size() = %d " +
"... | java | private void onChangedImpl(final int preferableCenterPosition) {
for (ListOnChangedListener listener: mOnChangedListeners) {
listener.onChangedStart(this);
}
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "onChangedImpl(%s): items [%d] views [%d] mLayouts.size() = %d " +
"... | [
"private",
"void",
"onChangedImpl",
"(",
"final",
"int",
"preferableCenterPosition",
")",
"{",
"for",
"(",
"ListOnChangedListener",
"listener",
":",
"mOnChangedListeners",
")",
"{",
"listener",
".",
"onChangedStart",
"(",
"this",
")",
";",
"}",
"Log",
".",
"d",
... | This method is called if the data set has been changed. Subclasses might want to override
this method to add some extra logic.
Go through all items in the list:
- reuse the existing views in the list
- add new views in the list if needed
- trim the unused views
- request re-layout
@param preferableCenterPosition the ... | [
"This",
"method",
"is",
"called",
"if",
"the",
"data",
"set",
"has",
"been",
"changed",
".",
"Subclasses",
"might",
"want",
"to",
"override",
"this",
"method",
"to",
"add",
"some",
"extra",
"logic",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/ListWidget.java#L1273-L1285 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/GVRConsoleFactory.java | GVRConsoleFactory.createTerminalConsoleShell | static Shell createTerminalConsoleShell(String prompt, String appName,
ShellCommandHandler mainHandler, InputStream input, OutputStream output) {
try {
PrintStream out = new PrintStream(output);
// Build jline terminal
jline.Terminal term = TerminalFactory.get();... | java | static Shell createTerminalConsoleShell(String prompt, String appName,
ShellCommandHandler mainHandler, InputStream input, OutputStream output) {
try {
PrintStream out = new PrintStream(output);
// Build jline terminal
jline.Terminal term = TerminalFactory.get();... | [
"static",
"Shell",
"createTerminalConsoleShell",
"(",
"String",
"prompt",
",",
"String",
"appName",
",",
"ShellCommandHandler",
"mainHandler",
",",
"InputStream",
"input",
",",
"OutputStream",
"output",
")",
"{",
"try",
"{",
"PrintStream",
"out",
"=",
"new",
"Prin... | Facade method for operating the Unix-like terminal supporting line editing and command
history.
@param prompt Prompt to be displayed
@param appName The app name string
@param mainHandler Main command handler
@param input Input stream.
@param output Output stream.
@return Shell that can be either further customized or ... | [
"Facade",
"method",
"for",
"operating",
"the",
"Unix",
"-",
"like",
"terminal",
"supporting",
"line",
"editing",
"and",
"command",
"history",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/GVRConsoleFactory.java#L97-L128 | train |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/GVRConsoleFactory.java | GVRConsoleFactory.createTelnetConsoleShell | static Shell createTelnetConsoleShell(String prompt, String appName,
ShellCommandHandler mainHandler, InputStream input, OutputStream output) {
try {
// Set up nvt4j; ignore the initial clear & reposition
final nvt4j.impl.Terminal nvt4jTerminal = new nvt4j.impl.Terminal(input... | java | static Shell createTelnetConsoleShell(String prompt, String appName,
ShellCommandHandler mainHandler, InputStream input, OutputStream output) {
try {
// Set up nvt4j; ignore the initial clear & reposition
final nvt4j.impl.Terminal nvt4jTerminal = new nvt4j.impl.Terminal(input... | [
"static",
"Shell",
"createTelnetConsoleShell",
"(",
"String",
"prompt",
",",
"String",
"appName",
",",
"ShellCommandHandler",
"mainHandler",
",",
"InputStream",
"input",
",",
"OutputStream",
"output",
")",
"{",
"try",
"{",
"// Set up nvt4j; ignore the initial clear & repo... | Facade method for operating the Telnet Shell supporting line editing and command
history over a socket.
@param prompt Prompt to be displayed
@param appName The app name string
@param mainHandler Main command handler
@param input Input stream.
@param output Output stream.
@return Shell that can be either further custom... | [
"Facade",
"method",
"for",
"operating",
"the",
"Telnet",
"Shell",
"supporting",
"line",
"editing",
"and",
"command",
"history",
"over",
"a",
"socket",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/GVRConsoleFactory.java#L141-L188 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.