id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
161,700 | 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 |
161,701 | 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 |
161,702 | 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 |
161,703 | 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 |
161,704 | 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 |
161,705 | 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 |
161,706 | 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 |
161,707 | 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 |
161,708 | 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 |
161,709 | 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 |
161,710 | 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 |
161,711 | 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 |
161,712 | 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 |
161,713 | 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 |
161,714 | 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 |
161,715 | 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 |
161,716 | 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 |
161,717 | 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 |
161,718 | 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 |
161,719 | 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 |
161,720 | 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 |
161,721 | 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 |
161,722 | 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 |
161,723 | 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 |
161,724 | 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 |
161,725 | 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 |
161,726 | 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 |
161,727 | 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 |
161,728 | 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 |
161,729 | 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 |
161,730 | 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 |
161,731 | 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 |
161,732 | 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 |
161,733 | 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 |
161,734 | 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 |
161,735 | 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 |
161,736 | 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 |
161,737 | 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 |
161,738 | 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 |
161,739 | 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 |
161,740 | 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 |
161,741 | 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 |
161,742 | 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 |
161,743 | 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 |
161,744 | 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 |
161,745 | 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 |
161,746 | 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 |
161,747 | 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 |
161,748 | 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 |
161,749 | 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 |
161,750 | 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 |
161,751 | Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/LODmanager.java | LODmanager.AddLODSceneObject | protected void AddLODSceneObject(GVRSceneObject currentSceneObject) {
if (this.transformLODSceneObject != null) {
GVRSceneObject levelOfDetailSceneObject = null;
if ( currentSceneObject.getParent() == this.transformLODSceneObject) {
levelOfDetailSceneObject = currentSceneObject;
}
el... | java | protected void AddLODSceneObject(GVRSceneObject currentSceneObject) {
if (this.transformLODSceneObject != null) {
GVRSceneObject levelOfDetailSceneObject = null;
if ( currentSceneObject.getParent() == this.transformLODSceneObject) {
levelOfDetailSceneObject = currentSceneObject;
}
el... | [
"protected",
"void",
"AddLODSceneObject",
"(",
"GVRSceneObject",
"currentSceneObject",
")",
"{",
"if",
"(",
"this",
".",
"transformLODSceneObject",
"!=",
"null",
")",
"{",
"GVRSceneObject",
"levelOfDetailSceneObject",
"=",
"null",
";",
"if",
"(",
"currentSceneObject",... | Add the currentSceneObject to an active Level-of-Detail | [
"Add",
"the",
"currentSceneObject",
"to",
"an",
"active",
"Level",
"-",
"of",
"-",
"Detail"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/LODmanager.java#L109-L146 |
161,752 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/MultiPageWidget.java | MultiPageWidget.applyLayout | @Override
public boolean applyLayout(Layout itemLayout) {
boolean applied = false;
if (itemLayout != null && mItemLayouts.add(itemLayout)) {
// apply the layout to all visible pages
List<Widget> views = getAllViews();
for (Widget view: views) {
vi... | java | @Override
public boolean applyLayout(Layout itemLayout) {
boolean applied = false;
if (itemLayout != null && mItemLayouts.add(itemLayout)) {
// apply the layout to all visible pages
List<Widget> views = getAllViews();
for (Widget view: views) {
vi... | [
"@",
"Override",
"public",
"boolean",
"applyLayout",
"(",
"Layout",
"itemLayout",
")",
"{",
"boolean",
"applied",
"=",
"false",
";",
"if",
"(",
"itemLayout",
"!=",
"null",
"&&",
"mItemLayouts",
".",
"add",
"(",
"itemLayout",
")",
")",
"{",
"// apply the layo... | Apply the layout to the each page in the list
@param itemLayout item layout in the page
@return true if the new layout is applied successfully, otherwise - false | [
"Apply",
"the",
"layout",
"to",
"the",
"each",
"page",
"in",
"the",
"list"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/MultiPageWidget.java#L172-L185 |
161,753 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/MultiPageWidget.java | MultiPageWidget.getPageScrollable | public LayoutScroller.ScrollableList getPageScrollable() {
return new LayoutScroller.ScrollableList() {
@Override
public int getScrollingItemsCount() {
return MultiPageWidget.super.getScrollingItemsCount();
}
@Override
public float g... | java | public LayoutScroller.ScrollableList getPageScrollable() {
return new LayoutScroller.ScrollableList() {
@Override
public int getScrollingItemsCount() {
return MultiPageWidget.super.getScrollingItemsCount();
}
@Override
public float g... | [
"public",
"LayoutScroller",
".",
"ScrollableList",
"getPageScrollable",
"(",
")",
"{",
"return",
"new",
"LayoutScroller",
".",
"ScrollableList",
"(",
")",
"{",
"@",
"Override",
"public",
"int",
"getScrollingItemsCount",
"(",
")",
"{",
"return",
"MultiPageWidget",
... | Provides the scrollableList implementation for page scrolling
@return {@link LayoutScroller.ScrollableList} implementation, passed to {@link LayoutScroller}
for the processing the scrolling | [
"Provides",
"the",
"scrollableList",
"implementation",
"for",
"page",
"scrolling"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/MultiPageWidget.java#L376-L426 |
161,754 | Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/ViewpointAnimation.java | ViewpointAnimation.startAnimation | public void startAnimation()
{
Date time = new Date();
this.beginAnimation = time.getTime();
this.endAnimation = beginAnimation + (long) (animationTime * 1000);
this.animate = true;
} | java | public void startAnimation()
{
Date time = new Date();
this.beginAnimation = time.getTime();
this.endAnimation = beginAnimation + (long) (animationTime * 1000);
this.animate = true;
} | [
"public",
"void",
"startAnimation",
"(",
")",
"{",
"Date",
"time",
"=",
"new",
"Date",
"(",
")",
";",
"this",
".",
"beginAnimation",
"=",
"time",
".",
"getTime",
"(",
")",
";",
"this",
".",
"endAnimation",
"=",
"beginAnimation",
"+",
"(",
"long",
")",
... | once animation is setup, start the animation record the beginning and
ending time for the animation | [
"once",
"animation",
"is",
"setup",
"start",
"the",
"animation",
"record",
"the",
"beginning",
"and",
"ending",
"time",
"for",
"the",
"animation"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/ViewpointAnimation.java#L99-L105 |
161,755 | Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/ViewpointAnimation.java | ViewpointAnimation.updateAnimation | public void updateAnimation()
{
Date time = new Date();
long currentTime = time.getTime() - this.beginAnimation;
if (currentTime > animationTime)
{
this.currentQuaternion.set(endQuaternion);
for (int i = 0; i < 3; i++)
{
this.currentPos[i] = this.endPos[i];
}
thi... | java | public void updateAnimation()
{
Date time = new Date();
long currentTime = time.getTime() - this.beginAnimation;
if (currentTime > animationTime)
{
this.currentQuaternion.set(endQuaternion);
for (int i = 0; i < 3; i++)
{
this.currentPos[i] = this.endPos[i];
}
thi... | [
"public",
"void",
"updateAnimation",
"(",
")",
"{",
"Date",
"time",
"=",
"new",
"Date",
"(",
")",
";",
"long",
"currentTime",
"=",
"time",
".",
"getTime",
"(",
")",
"-",
"this",
".",
"beginAnimation",
";",
"if",
"(",
"currentTime",
">",
"animationTime",
... | called per frame of animation to update the camera position | [
"called",
"per",
"frame",
"of",
"animation",
"to",
"update",
"the",
"camera",
"position"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/ViewpointAnimation.java#L110-L136 |
161,756 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRTextureParameters.java | GVRTextureParameters.getDefalutValuesArray | public int[] getDefalutValuesArray() {
int[] defaultValues = new int[5];
defaultValues[0] = GLES20.GL_LINEAR_MIPMAP_NEAREST; // MIN FILTER
defaultValues[1] = GLES20.GL_LINEAR; // MAG FILTER
defaultValues[2] = 1; // ANISO FILTER
defaultValues[3] = GLES20.GL_CLAMP_TO_EDGE; // WRAP... | java | public int[] getDefalutValuesArray() {
int[] defaultValues = new int[5];
defaultValues[0] = GLES20.GL_LINEAR_MIPMAP_NEAREST; // MIN FILTER
defaultValues[1] = GLES20.GL_LINEAR; // MAG FILTER
defaultValues[2] = 1; // ANISO FILTER
defaultValues[3] = GLES20.GL_CLAMP_TO_EDGE; // WRAP... | [
"public",
"int",
"[",
"]",
"getDefalutValuesArray",
"(",
")",
"{",
"int",
"[",
"]",
"defaultValues",
"=",
"new",
"int",
"[",
"5",
"]",
";",
"defaultValues",
"[",
"0",
"]",
"=",
"GLES20",
".",
"GL_LINEAR_MIPMAP_NEAREST",
";",
"// MIN FILTER",
"defaultValues",... | Returns an integer array that contains the default values for all the
texture parameters.
@return an integer array that contains the default values for all the
texture parameters. | [
"Returns",
"an",
"integer",
"array",
"that",
"contains",
"the",
"default",
"values",
"for",
"all",
"the",
"texture",
"parameters",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRTextureParameters.java#L203-L213 |
161,757 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRTextureParameters.java | GVRTextureParameters.getCurrentValuesArray | public int[] getCurrentValuesArray() {
int[] currentValues = new int[5];
currentValues[0] = getMinFilterType().getFilterValue(); // MIN FILTER
currentValues[1] = getMagFilterType().getFilterValue(); // MAG FILTER
currentValues[2] = getAnisotropicValue(); // ANISO FILTER
currentV... | java | public int[] getCurrentValuesArray() {
int[] currentValues = new int[5];
currentValues[0] = getMinFilterType().getFilterValue(); // MIN FILTER
currentValues[1] = getMagFilterType().getFilterValue(); // MAG FILTER
currentValues[2] = getAnisotropicValue(); // ANISO FILTER
currentV... | [
"public",
"int",
"[",
"]",
"getCurrentValuesArray",
"(",
")",
"{",
"int",
"[",
"]",
"currentValues",
"=",
"new",
"int",
"[",
"5",
"]",
";",
"currentValues",
"[",
"0",
"]",
"=",
"getMinFilterType",
"(",
")",
".",
"getFilterValue",
"(",
")",
";",
"// MIN... | Returns an integer array that contains the current values for all the
texture parameters.
@return an integer array that contains the current values for all the
texture parameters. | [
"Returns",
"an",
"integer",
"array",
"that",
"contains",
"the",
"current",
"values",
"for",
"all",
"the",
"texture",
"parameters",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRTextureParameters.java#L222-L232 |
161,758 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java | AiMaterial.hasProperties | public boolean hasProperties(Set<PropertyKey> keys) {
for (PropertyKey key : keys) {
if (null == getProperty(key.m_key)) {
return false;
}
}
return true;
} | java | public boolean hasProperties(Set<PropertyKey> keys) {
for (PropertyKey key : keys) {
if (null == getProperty(key.m_key)) {
return false;
}
}
return true;
} | [
"public",
"boolean",
"hasProperties",
"(",
"Set",
"<",
"PropertyKey",
">",
"keys",
")",
"{",
"for",
"(",
"PropertyKey",
"key",
":",
"keys",
")",
"{",
"if",
"(",
"null",
"==",
"getProperty",
"(",
"key",
".",
"m_key",
")",
")",
"{",
"return",
"false",
... | Checks whether the given set of properties is available.
@param keys the keys to check
@return true if all properties are available, false otherwise | [
"Checks",
"whether",
"the",
"given",
"set",
"of",
"properties",
"is",
"available",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java#L499-L507 |
161,759 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java | AiMaterial.getTextureMagFilter | public Integer getTextureMagFilter(AiTextureType type, int index) {
checkTexRange(type, index);
Property p = getProperty(PropertyKey.TEX_MAG_FILTER.m_key);
if (null == p || null == p.getData()) {
return (Integer) m_defaults.get(PropertyKey.TEX_MAG_FILTER);
}
Object ... | java | public Integer getTextureMagFilter(AiTextureType type, int index) {
checkTexRange(type, index);
Property p = getProperty(PropertyKey.TEX_MAG_FILTER.m_key);
if (null == p || null == p.getData()) {
return (Integer) m_defaults.get(PropertyKey.TEX_MAG_FILTER);
}
Object ... | [
"public",
"Integer",
"getTextureMagFilter",
"(",
"AiTextureType",
"type",
",",
"int",
"index",
")",
"{",
"checkTexRange",
"(",
"type",
",",
"index",
")",
";",
"Property",
"p",
"=",
"getProperty",
"(",
"PropertyKey",
".",
"TEX_MAG_FILTER",
".",
"m_key",
")",
... | Returns the texture magnification filter
If missing, defaults to {@link GL_LINEAR }
@param type the texture type
@param index the index in the texture stack
@return the texture magnification filter | [
"Returns",
"the",
"texture",
"magnification",
"filter"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java#L1051-L1069 |
161,760 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java | AiMaterial.getMetallic | public float getMetallic()
{
Property p = getProperty(PropertyKey.METALLIC.m_key);
if (null == p || null == p.getData())
{
throw new IllegalArgumentException("Metallic property not found");
}
Object rawValue = p.getData();
if (rawValue instanceof java.nio... | java | public float getMetallic()
{
Property p = getProperty(PropertyKey.METALLIC.m_key);
if (null == p || null == p.getData())
{
throw new IllegalArgumentException("Metallic property not found");
}
Object rawValue = p.getData();
if (rawValue instanceof java.nio... | [
"public",
"float",
"getMetallic",
"(",
")",
"{",
"Property",
"p",
"=",
"getProperty",
"(",
"PropertyKey",
".",
"METALLIC",
".",
"m_key",
")",
";",
"if",
"(",
"null",
"==",
"p",
"||",
"null",
"==",
"p",
".",
"getData",
"(",
")",
")",
"{",
"throw",
"... | Returns the metallic factor for PBR shading | [
"Returns",
"the",
"metallic",
"factor",
"for",
"PBR",
"shading"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java#L1074-L1092 |
161,761 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java | AiMaterial.getTextureInfo | public AiTextureInfo getTextureInfo(AiTextureType type, int index) {
return new AiTextureInfo(type, index, getTextureFile(type, index),
getTextureUVIndex(type, index), getBlendFactor(type, index),
getTextureOp(type, index), getTextureMapModeW(type, index),
getT... | java | public AiTextureInfo getTextureInfo(AiTextureType type, int index) {
return new AiTextureInfo(type, index, getTextureFile(type, index),
getTextureUVIndex(type, index), getBlendFactor(type, index),
getTextureOp(type, index), getTextureMapModeW(type, index),
getT... | [
"public",
"AiTextureInfo",
"getTextureInfo",
"(",
"AiTextureType",
"type",
",",
"int",
"index",
")",
"{",
"return",
"new",
"AiTextureInfo",
"(",
"type",
",",
"index",
",",
"getTextureFile",
"(",
"type",
",",
"index",
")",
",",
"getTextureUVIndex",
"(",
"type",... | Returns all information related to a single texture.
@param type the texture type
@param index the index in the texture stack
@return the texture information | [
"Returns",
"all",
"information",
"related",
"to",
"a",
"single",
"texture",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java#L1159-L1165 |
161,762 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java | AiMaterial.checkTexRange | private void checkTexRange(AiTextureType type, int index) {
if (index < 0 || index > m_numTextures.get(type)) {
throw new IndexOutOfBoundsException("Index: " + index + ", Size: " +
m_numTextures.get(type));
}
} | java | private void checkTexRange(AiTextureType type, int index) {
if (index < 0 || index > m_numTextures.get(type)) {
throw new IndexOutOfBoundsException("Index: " + index + ", Size: " +
m_numTextures.get(type));
}
} | [
"private",
"void",
"checkTexRange",
"(",
"AiTextureType",
"type",
",",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"<",
"0",
"||",
"index",
">",
"m_numTextures",
".",
"get",
"(",
"type",
")",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
... | Checks that index is valid an throw an exception if not.
@param type the type
@param index the index to check | [
"Checks",
"that",
"index",
"is",
"valid",
"an",
"throw",
"an",
"exception",
"if",
"not",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java#L1268-L1273 |
161,763 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java | AiMaterial.setTextureNumber | @SuppressWarnings("unused")
private void setTextureNumber(int type, int number) {
m_numTextures.put(AiTextureType.fromRawValue(type), number);
} | java | @SuppressWarnings("unused")
private void setTextureNumber(int type, int number) {
m_numTextures.put(AiTextureType.fromRawValue(type), number);
} | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"private",
"void",
"setTextureNumber",
"(",
"int",
"type",
",",
"int",
"number",
")",
"{",
"m_numTextures",
".",
"put",
"(",
"AiTextureType",
".",
"fromRawValue",
"(",
"type",
")",
",",
"number",
")",
";",
"... | This method is used by JNI, do not call or modify.
@param type the type
@param number the number | [
"This",
"method",
"is",
"used",
"by",
"JNI",
"do",
"not",
"call",
"or",
"modify",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java#L1334-L1337 |
161,764 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRFrustumPicker.java | GVRFrustumPicker.setFrustum | public void setFrustum(float[] frustum)
{
Matrix4f projMatrix = new Matrix4f();
projMatrix.setFrustum(frustum[0], frustum[3], frustum[1], frustum[4], frustum[2], frustum[5]);
setFrustum(projMatrix);
} | java | public void setFrustum(float[] frustum)
{
Matrix4f projMatrix = new Matrix4f();
projMatrix.setFrustum(frustum[0], frustum[3], frustum[1], frustum[4], frustum[2], frustum[5]);
setFrustum(projMatrix);
} | [
"public",
"void",
"setFrustum",
"(",
"float",
"[",
"]",
"frustum",
")",
"{",
"Matrix4f",
"projMatrix",
"=",
"new",
"Matrix4f",
"(",
")",
";",
"projMatrix",
".",
"setFrustum",
"(",
"frustum",
"[",
"0",
"]",
",",
"frustum",
"[",
"3",
"]",
",",
"frustum",... | Set the view frustum to pick against from the minimum and maximum corners.
The viewpoint of the frustum is the center of the scene object
the picker is attached to. The view direction is the forward
direction of that scene object. The frustum will pick what a camera
attached to the scene object with that view frustum w... | [
"Set",
"the",
"view",
"frustum",
"to",
"pick",
"against",
"from",
"the",
"minimum",
"and",
"maximum",
"corners",
".",
"The",
"viewpoint",
"of",
"the",
"frustum",
"is",
"the",
"center",
"of",
"the",
"scene",
"object",
"the",
"picker",
"is",
"attached",
"to"... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRFrustumPicker.java#L92-L97 |
161,765 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRFrustumPicker.java | GVRFrustumPicker.setFrustum | public void setFrustum(float fovy, float aspect, float znear, float zfar)
{
Matrix4f projMatrix = new Matrix4f();
projMatrix.perspective((float) Math.toRadians(fovy), aspect, znear, zfar);
setFrustum(projMatrix);
} | java | public void setFrustum(float fovy, float aspect, float znear, float zfar)
{
Matrix4f projMatrix = new Matrix4f();
projMatrix.perspective((float) Math.toRadians(fovy), aspect, znear, zfar);
setFrustum(projMatrix);
} | [
"public",
"void",
"setFrustum",
"(",
"float",
"fovy",
",",
"float",
"aspect",
",",
"float",
"znear",
",",
"float",
"zfar",
")",
"{",
"Matrix4f",
"projMatrix",
"=",
"new",
"Matrix4f",
"(",
")",
";",
"projMatrix",
".",
"perspective",
"(",
"(",
"float",
")"... | Set the view frustum to pick against from the field of view, aspect
ratio and near, far clip planes. The viewpoint of the frustum
is the center of the scene object the picker is attached to.
The view direction is the forward direction of that scene object.
The frustum will pick what a camera attached to the scene objec... | [
"Set",
"the",
"view",
"frustum",
"to",
"pick",
"against",
"from",
"the",
"field",
"of",
"view",
"aspect",
"ratio",
"and",
"near",
"far",
"clip",
"planes",
".",
"The",
"viewpoint",
"of",
"the",
"frustum",
"is",
"the",
"center",
"of",
"the",
"scene",
"obje... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRFrustumPicker.java#L112-L117 |
161,766 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRFrustumPicker.java | GVRFrustumPicker.setFrustum | public void setFrustum(Matrix4f projMatrix)
{
if (projMatrix != null)
{
if (mProjMatrix == null)
{
mProjMatrix = new float[16];
}
mProjMatrix = projMatrix.get(mProjMatrix, 0);
mScene.setPickVisible(false);
if (mC... | java | public void setFrustum(Matrix4f projMatrix)
{
if (projMatrix != null)
{
if (mProjMatrix == null)
{
mProjMatrix = new float[16];
}
mProjMatrix = projMatrix.get(mProjMatrix, 0);
mScene.setPickVisible(false);
if (mC... | [
"public",
"void",
"setFrustum",
"(",
"Matrix4f",
"projMatrix",
")",
"{",
"if",
"(",
"projMatrix",
"!=",
"null",
")",
"{",
"if",
"(",
"mProjMatrix",
"==",
"null",
")",
"{",
"mProjMatrix",
"=",
"new",
"float",
"[",
"16",
"]",
";",
"}",
"mProjMatrix",
"="... | Set the view frustum to pick against from the given projection matrix.
If the projection matrix is null, the picker will revert to picking
objects that are visible from the viewpoint of the scene's current camera.
If a matrix is given, the picker will pick objects that are visible
from the viewpoint of it's owner the... | [
"Set",
"the",
"view",
"frustum",
"to",
"pick",
"against",
"from",
"the",
"given",
"projection",
"matrix",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRFrustumPicker.java#L130-L150 |
161,767 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRFrustumPicker.java | GVRFrustumPicker.pickVisible | public static final GVRPickedObject[] pickVisible(GVRScene scene) {
sFindObjectsLock.lock();
try {
final GVRPickedObject[] result = NativePicker.pickVisible(scene.getNative());
return result;
} finally {
sFindObjectsLock.unlock();
}
} | java | public static final GVRPickedObject[] pickVisible(GVRScene scene) {
sFindObjectsLock.lock();
try {
final GVRPickedObject[] result = NativePicker.pickVisible(scene.getNative());
return result;
} finally {
sFindObjectsLock.unlock();
}
} | [
"public",
"static",
"final",
"GVRPickedObject",
"[",
"]",
"pickVisible",
"(",
"GVRScene",
"scene",
")",
"{",
"sFindObjectsLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"final",
"GVRPickedObject",
"[",
"]",
"result",
"=",
"NativePicker",
".",
"pickVisible",
... | Returns the list of colliders attached to scene objects that are
visible from the viewpoint of the camera.
<p>
This method is thread safe because it guarantees that only
one thread at a time is picking against particular scene graph,
and it extracts the hit data during within its synchronized block. You
can then exami... | [
"Returns",
"the",
"list",
"of",
"colliders",
"attached",
"to",
"scene",
"objects",
"that",
"are",
"visible",
"from",
"the",
"viewpoint",
"of",
"the",
"camera",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRFrustumPicker.java#L240-L248 |
161,768 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRIndexBuffer.java | GVRIndexBuffer.setShortVec | public void setShortVec(char[] data)
{
if (data == null)
{
throw new IllegalArgumentException("Input data for indices cannot be null");
}
if (getIndexSize() != 2)
{
throw new UnsupportedOperationException("Cannot update integer indices with char array"... | java | public void setShortVec(char[] data)
{
if (data == null)
{
throw new IllegalArgumentException("Input data for indices cannot be null");
}
if (getIndexSize() != 2)
{
throw new UnsupportedOperationException("Cannot update integer indices with char array"... | [
"public",
"void",
"setShortVec",
"(",
"char",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"data",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Input data for indices cannot be null\"",
")",
";",
"}",
"if",
"(",
"getIndexSize",
"(",
... | Updates the indices in the index buffer from a Java char array.
All of the entries of the input char array are copied into
the storage for the index buffer. The new indices must be the
same size as the old indices - the index buffer size cannot be changed.
@param data char array containing the new values
@throws Illega... | [
"Updates",
"the",
"indices",
"in",
"the",
"index",
"buffer",
"from",
"a",
"Java",
"char",
"array",
".",
"All",
"of",
"the",
"entries",
"of",
"the",
"input",
"char",
"array",
"are",
"copied",
"into",
"the",
"storage",
"for",
"the",
"index",
"buffer",
".",... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRIndexBuffer.java#L192-L206 |
161,769 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRIndexBuffer.java | GVRIndexBuffer.setShortVec | public void setShortVec(CharBuffer data)
{
if (data == null)
{
throw new IllegalArgumentException("Input data for indices cannot be null");
}
if (getIndexSize() != 2)
{
throw new UnsupportedOperationException("Cannot update integer indices with char ar... | java | public void setShortVec(CharBuffer data)
{
if (data == null)
{
throw new IllegalArgumentException("Input data for indices cannot be null");
}
if (getIndexSize() != 2)
{
throw new UnsupportedOperationException("Cannot update integer indices with char ar... | [
"public",
"void",
"setShortVec",
"(",
"CharBuffer",
"data",
")",
"{",
"if",
"(",
"data",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Input data for indices cannot be null\"",
")",
";",
"}",
"if",
"(",
"getIndexSize",
"(",
")",
"... | Updates the indices in the index buffer from a Java CharBuffer.
All of the entries of the input buffer are copied into
the storage for the index buffer. The new indices must be the
same size as the old indices - the index buffer size cannot be changed.
@param data CharBuffer containing the new values
@throws IllegalArg... | [
"Updates",
"the",
"indices",
"in",
"the",
"index",
"buffer",
"from",
"a",
"Java",
"CharBuffer",
".",
"All",
"of",
"the",
"entries",
"of",
"the",
"input",
"buffer",
"are",
"copied",
"into",
"the",
"storage",
"for",
"the",
"index",
"buffer",
".",
"The",
"n... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRIndexBuffer.java#L216-L245 |
161,770 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRIndexBuffer.java | GVRIndexBuffer.setIntVec | public void setIntVec(int[] data)
{
if (data == null)
{
throw new IllegalArgumentException("Input data for indices cannot be null");
}
if (getIndexSize() != 4)
{
throw new UnsupportedOperationException("Cannot update short indices with int array");
... | java | public void setIntVec(int[] data)
{
if (data == null)
{
throw new IllegalArgumentException("Input data for indices cannot be null");
}
if (getIndexSize() != 4)
{
throw new UnsupportedOperationException("Cannot update short indices with int array");
... | [
"public",
"void",
"setIntVec",
"(",
"int",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"data",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Input data for indices cannot be null\"",
")",
";",
"}",
"if",
"(",
"getIndexSize",
"(",
")"... | Updates the indices in the index buffer from a Java int array.
All of the entries of the input int array are copied into
the storage for the index buffer. The new indices must be the
same size as the old indices - the index buffer size cannot be changed.
@param data char array containing the new values
@throws IllegalA... | [
"Updates",
"the",
"indices",
"in",
"the",
"index",
"buffer",
"from",
"a",
"Java",
"int",
"array",
".",
"All",
"of",
"the",
"entries",
"of",
"the",
"input",
"int",
"array",
"are",
"copied",
"into",
"the",
"storage",
"for",
"the",
"index",
"buffer",
".",
... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRIndexBuffer.java#L255-L269 |
161,771 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRIndexBuffer.java | GVRIndexBuffer.setIntVec | public void setIntVec(IntBuffer data)
{
if (data == null)
{
throw new IllegalArgumentException("Input buffer for indices cannot be null");
}
if (getIndexSize() != 4)
{
throw new UnsupportedOperationException("Cannot update integer indices with short ar... | java | public void setIntVec(IntBuffer data)
{
if (data == null)
{
throw new IllegalArgumentException("Input buffer for indices cannot be null");
}
if (getIndexSize() != 4)
{
throw new UnsupportedOperationException("Cannot update integer indices with short ar... | [
"public",
"void",
"setIntVec",
"(",
"IntBuffer",
"data",
")",
"{",
"if",
"(",
"data",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Input buffer for indices cannot be null\"",
")",
";",
"}",
"if",
"(",
"getIndexSize",
"(",
")",
"!... | Updates the indices in the index buffer from a Java IntBuffer.
All of the entries of the input int buffer are copied into
the storage for the index buffer. The new indices must be the
same size as the old indices - the index buffer size cannot be changed.
@param data char array containing the new values
@throws Illegal... | [
"Updates",
"the",
"indices",
"in",
"the",
"index",
"buffer",
"from",
"a",
"Java",
"IntBuffer",
".",
"All",
"of",
"the",
"entries",
"of",
"the",
"input",
"int",
"buffer",
"are",
"copied",
"into",
"the",
"storage",
"for",
"the",
"index",
"buffer",
".",
"Th... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRIndexBuffer.java#L279-L307 |
161,772 | Samsung/GearVRf | GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVREmitter.java | GVREmitter.emitWithBurstCheck | protected void emitWithBurstCheck(float[] particlePositions, float[] particleVelocities,
float[] particleTimeStamps)
{
if ( burstMode )
{
if ( executeOnce )
{
emit(particlePositions, particleVelocities, particleTimeStamps);
... | java | protected void emitWithBurstCheck(float[] particlePositions, float[] particleVelocities,
float[] particleTimeStamps)
{
if ( burstMode )
{
if ( executeOnce )
{
emit(particlePositions, particleVelocities, particleTimeStamps);
... | [
"protected",
"void",
"emitWithBurstCheck",
"(",
"float",
"[",
"]",
"particlePositions",
",",
"float",
"[",
"]",
"particleVelocities",
",",
"float",
"[",
"]",
"particleTimeStamps",
")",
"{",
"if",
"(",
"burstMode",
")",
"{",
"if",
"(",
"executeOnce",
")",
"{"... | If the burst mode is on, emit the particles only once.
@param particlePositions
@param particleVelocities
@param particleTimeStamps | [
"If",
"the",
"burst",
"mode",
"is",
"on",
"emit",
"the",
"particles",
"only",
"once",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVREmitter.java#L134-L150 |
161,773 | Samsung/GearVRf | GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVREmitter.java | GVREmitter.emit | private void emit(float[] particlePositions, float[] particleVelocities,
float[] particleTimeStamps)
{
float[] allParticlePositions = new float[particlePositions.length + particleBoundingVolume.length];
System.arraycopy(particlePositions, 0, allParticlePositions, 0, particlePos... | java | private void emit(float[] particlePositions, float[] particleVelocities,
float[] particleTimeStamps)
{
float[] allParticlePositions = new float[particlePositions.length + particleBoundingVolume.length];
System.arraycopy(particlePositions, 0, allParticlePositions, 0, particlePos... | [
"private",
"void",
"emit",
"(",
"float",
"[",
"]",
"particlePositions",
",",
"float",
"[",
"]",
"particleVelocities",
",",
"float",
"[",
"]",
"particleTimeStamps",
")",
"{",
"float",
"[",
"]",
"allParticlePositions",
"=",
"new",
"float",
"[",
"particlePosition... | Append the bounding volume particle positions, times and velocities to the existing mesh
before creating a new scene object with this mesh attached to it.
Also, append every created scene object and its creation time to corresponding array lists.
@param particlePositions
@param particleVelocities
@param particleTimeSt... | [
"Append",
"the",
"bounding",
"volume",
"particle",
"positions",
"times",
"and",
"velocities",
"to",
"the",
"existing",
"mesh",
"before",
"creating",
"a",
"new",
"scene",
"object",
"with",
"this",
"mesh",
"attached",
"to",
"it",
".",
"Also",
"append",
"every",
... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVREmitter.java#L162-L189 |
161,774 | Samsung/GearVRf | GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVREmitter.java | GVREmitter.setVelocityRange | public void setVelocityRange( final Vector3f minV, final Vector3f maxV )
{
if (null != mGVRContext) {
mGVRContext.runOnGlThread(new Runnable() {
@Override
public void run() {
minVelocity = minV;
maxVelocity = maxV;
... | java | public void setVelocityRange( final Vector3f minV, final Vector3f maxV )
{
if (null != mGVRContext) {
mGVRContext.runOnGlThread(new Runnable() {
@Override
public void run() {
minVelocity = minV;
maxVelocity = maxV;
... | [
"public",
"void",
"setVelocityRange",
"(",
"final",
"Vector3f",
"minV",
",",
"final",
"Vector3f",
"maxV",
")",
"{",
"if",
"(",
"null",
"!=",
"mGVRContext",
")",
"{",
"mGVRContext",
".",
"runOnGlThread",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override... | The range of velocities that a particle generated from this emitter can have.
@param minV Minimum velocity that a particle can have
@param maxV Maximum velocity that a particle can have | [
"The",
"range",
"of",
"velocities",
"that",
"a",
"particle",
"generated",
"from",
"this",
"emitter",
"can",
"have",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-particlesystem/src/main/java/org/gearvrf/particlesystem/GVREmitter.java#L294-L306 |
161,775 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Log.java | Log.logLong | public static void logLong(String TAG, String longString) {
InputStream is = new ByteArrayInputStream( longString.getBytes() );
@SuppressWarnings("resource")
Scanner scan = new Scanner(is);
while (scan.hasNextLine()) {
Log.v(TAG, scan.nextLine());
}
} | java | public static void logLong(String TAG, String longString) {
InputStream is = new ByteArrayInputStream( longString.getBytes() );
@SuppressWarnings("resource")
Scanner scan = new Scanner(is);
while (scan.hasNextLine()) {
Log.v(TAG, scan.nextLine());
}
} | [
"public",
"static",
"void",
"logLong",
"(",
"String",
"TAG",
",",
"String",
"longString",
")",
"{",
"InputStream",
"is",
"=",
"new",
"ByteArrayInputStream",
"(",
"longString",
".",
"getBytes",
"(",
")",
")",
";",
"@",
"SuppressWarnings",
"(",
"\"resource\"",
... | Log long string using verbose tag
@param TAG The tag.
@param longString The long string. | [
"Log",
"long",
"string",
"using",
"verbose",
"tag"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Log.java#L116-L123 |
161,776 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java | Utility.readTextFile | public static String readTextFile(Context context, String asset) {
try {
InputStream inputStream = context.getAssets().open(asset);
return org.gearvrf.utility.TextFile.readTextFile(inputStream);
} catch (FileNotFoundException f) {
Log.w(TAG, "readTextFile(): asset fil... | java | public static String readTextFile(Context context, String asset) {
try {
InputStream inputStream = context.getAssets().open(asset);
return org.gearvrf.utility.TextFile.readTextFile(inputStream);
} catch (FileNotFoundException f) {
Log.w(TAG, "readTextFile(): asset fil... | [
"public",
"static",
"String",
"readTextFile",
"(",
"Context",
"context",
",",
"String",
"asset",
")",
"{",
"try",
"{",
"InputStream",
"inputStream",
"=",
"context",
".",
"getAssets",
"(",
")",
".",
"open",
"(",
"asset",
")",
";",
"return",
"org",
".",
"g... | Read a text file from assets into a single string
@param context
A non-null Android Context
@param asset
The asset file to read
@return The contents or null on error. | [
"Read",
"a",
"text",
"file",
"from",
"assets",
"into",
"a",
"single",
"string"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java#L42-L53 |
161,777 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java | Utility.equal | public static boolean equal(Vector3f v1, Vector3f v2) {
return equal(v1.x, v2.x) && equal(v1.y, v2.y) && equal(v1.z, v2.z);
} | java | public static boolean equal(Vector3f v1, Vector3f v2) {
return equal(v1.x, v2.x) && equal(v1.y, v2.y) && equal(v1.z, v2.z);
} | [
"public",
"static",
"boolean",
"equal",
"(",
"Vector3f",
"v1",
",",
"Vector3f",
"v2",
")",
"{",
"return",
"equal",
"(",
"v1",
".",
"x",
",",
"v2",
".",
"x",
")",
"&&",
"equal",
"(",
"v1",
".",
"y",
",",
"v2",
".",
"y",
")",
"&&",
"equal",
"(",
... | Are these two numbers effectively equal?
The same logic is applied for each of the 3 vector dimensions: see {@link #equal}
@param v1
@param v2 | [
"Are",
"these",
"two",
"numbers",
"effectively",
"equal?"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java#L90-L92 |
161,778 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java | Utility.getId | public static int getId(Context context, String id) {
final String defType;
if (id.startsWith("R.")) {
int dot = id.indexOf('.', 2);
defType = id.substring(2, dot);
} else {
defType = "drawable";
}
Log.d(TAG, "getId(): id: %s, extracted type: ... | java | public static int getId(Context context, String id) {
final String defType;
if (id.startsWith("R.")) {
int dot = id.indexOf('.', 2);
defType = id.substring(2, dot);
} else {
defType = "drawable";
}
Log.d(TAG, "getId(): id: %s, extracted type: ... | [
"public",
"static",
"int",
"getId",
"(",
"Context",
"context",
",",
"String",
"id",
")",
"{",
"final",
"String",
"defType",
";",
"if",
"(",
"id",
".",
"startsWith",
"(",
"\"R.\"",
")",
")",
"{",
"int",
"dot",
"=",
"id",
".",
"indexOf",
"(",
"'",
"'... | Parses the resource String id and get back the int res id
@param context
@param id String resource id
@return int resource id | [
"Parses",
"the",
"resource",
"String",
"id",
"and",
"get",
"back",
"the",
"int",
"res",
"id"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java#L100-L111 |
161,779 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java | Utility.getId | public static int getId(Context context, String id, String defType) {
String type = "R." + defType + ".";
if (id.startsWith(type)) {
id = id.substring(type.length());
}
Resources r = context.getResources();
int resId = r.getIdentifier(id, defType,
con... | java | public static int getId(Context context, String id, String defType) {
String type = "R." + defType + ".";
if (id.startsWith(type)) {
id = id.substring(type.length());
}
Resources r = context.getResources();
int resId = r.getIdentifier(id, defType,
con... | [
"public",
"static",
"int",
"getId",
"(",
"Context",
"context",
",",
"String",
"id",
",",
"String",
"defType",
")",
"{",
"String",
"type",
"=",
"\"R.\"",
"+",
"defType",
"+",
"\".\"",
";",
"if",
"(",
"id",
".",
"startsWith",
"(",
"type",
")",
")",
"{"... | Get the int resource id with specified type definition
@param context
@param id String resource id
@return int resource id | [
"Get",
"the",
"int",
"resource",
"id",
"with",
"specified",
"type",
"definition"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java#L119-L133 |
161,780 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShader.java | GVRShader.generateSignature | public String generateSignature(HashMap<String, Integer> defined, GVRLight[] lightlist)
{
return getClass().getSimpleName();
} | java | public String generateSignature(HashMap<String, Integer> defined, GVRLight[] lightlist)
{
return getClass().getSimpleName();
} | [
"public",
"String",
"generateSignature",
"(",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"defined",
",",
"GVRLight",
"[",
"]",
"lightlist",
")",
"{",
"return",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
";",
"}"
] | Create a unique signature for this shader.
The signature for simple shaders is just the class name.
For the more complex shaders generated by GVRShaderTemplate
the signature includes information about the vertex attributes,
uniforms, textures and lights used by the shader variant.
@param defined
names to be defined fo... | [
"Create",
"a",
"unique",
"signature",
"for",
"this",
"shader",
".",
"The",
"signature",
"for",
"simple",
"shaders",
"is",
"just",
"the",
"class",
"name",
".",
"For",
"the",
"more",
"complex",
"shaders",
"generated",
"by",
"GVRShaderTemplate",
"the",
"signature... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShader.java#L244-L247 |
161,781 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShader.java | GVRShader.bindShader | public int bindShader(GVRContext context, IRenderable rdata, GVRScene scene, boolean isMultiview)
{
String signature = getClass().getSimpleName();
GVRShaderManager shaderManager = context.getShaderManager();
GVRMaterial mtl = rdata.getMaterial();
synchronized (shaderManager)
... | java | public int bindShader(GVRContext context, IRenderable rdata, GVRScene scene, boolean isMultiview)
{
String signature = getClass().getSimpleName();
GVRShaderManager shaderManager = context.getShaderManager();
GVRMaterial mtl = rdata.getMaterial();
synchronized (shaderManager)
... | [
"public",
"int",
"bindShader",
"(",
"GVRContext",
"context",
",",
"IRenderable",
"rdata",
",",
"GVRScene",
"scene",
",",
"boolean",
"isMultiview",
")",
"{",
"String",
"signature",
"=",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
";",
"GVRShaderManage... | Select the specific vertex and fragment shader to use.
The shader template is used to generate the sources for the vertex and
fragment shader based on the vertex, material and light properties. This
function may compile the shader if it does not already exist.
@param context
GVRContext
@param rdata
renderable entity ... | [
"Select",
"the",
"specific",
"vertex",
"and",
"fragment",
"shader",
"to",
"use",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShader.java#L306-L325 |
161,782 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShader.java | GVRShader.bindShader | public int bindShader(GVRContext context, GVRShaderData material, String vertexDesc)
{
String signature = getClass().getSimpleName();
GVRShaderManager shaderManager = context.getShaderManager();
synchronized (shaderManager)
{
int nativeShader = shaderManager.getShader(si... | java | public int bindShader(GVRContext context, GVRShaderData material, String vertexDesc)
{
String signature = getClass().getSimpleName();
GVRShaderManager shaderManager = context.getShaderManager();
synchronized (shaderManager)
{
int nativeShader = shaderManager.getShader(si... | [
"public",
"int",
"bindShader",
"(",
"GVRContext",
"context",
",",
"GVRShaderData",
"material",
",",
"String",
"vertexDesc",
")",
"{",
"String",
"signature",
"=",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
";",
"GVRShaderManager",
"shaderManager",
"=",... | Select the specific vertex and fragment shader to use with this material.
The shader template is used to generate the sources for the vertex and
fragment shader based on the material properties only.
It will ignore the mesh attributes and all lights.
@param context
GVRContext
@param material
material to use with the ... | [
"Select",
"the",
"specific",
"vertex",
"and",
"fragment",
"shader",
"to",
"use",
"with",
"this",
"material",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShader.java#L340-L354 |
161,783 | Samsung/GearVRf | GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/PhysicsDragger.java | PhysicsDragger.startDrag | public GVRSceneObject startDrag(GVRSceneObject dragMe, float relX, float relY, float relZ) {
synchronized (mLock) {
if (mCursorController == null) {
Log.w(TAG, "Physics drag failed: Cursor controller not found!");
return null;
}
if (mDragMe !=... | java | public GVRSceneObject startDrag(GVRSceneObject dragMe, float relX, float relY, float relZ) {
synchronized (mLock) {
if (mCursorController == null) {
Log.w(TAG, "Physics drag failed: Cursor controller not found!");
return null;
}
if (mDragMe !=... | [
"public",
"GVRSceneObject",
"startDrag",
"(",
"GVRSceneObject",
"dragMe",
",",
"float",
"relX",
",",
"float",
"relY",
",",
"float",
"relZ",
")",
"{",
"synchronized",
"(",
"mLock",
")",
"{",
"if",
"(",
"mCursorController",
"==",
"null",
")",
"{",
"Log",
"."... | Start the drag of the pivot object.
@param dragMe Scene object with a rigid body.
@param relX rel position in x-axis.
@param relY rel position in y-axis.
@param relZ rel position in z-axis.
@return Pivot instance if success, otherwise returns null. | [
"Start",
"the",
"drag",
"of",
"the",
"pivot",
"object",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/PhysicsDragger.java#L67-L97 |
161,784 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderData.java | GVRShaderData.setTexCoord | public void setTexCoord(String texName, String texCoordAttr, String shaderVarName)
{
synchronized (textures)
{
GVRTexture tex = textures.get(texName);
if (tex != null)
{
tex.setTexCoord(texCoordAttr, shaderVarName);
}
else
... | java | public void setTexCoord(String texName, String texCoordAttr, String shaderVarName)
{
synchronized (textures)
{
GVRTexture tex = textures.get(texName);
if (tex != null)
{
tex.setTexCoord(texCoordAttr, shaderVarName);
}
else
... | [
"public",
"void",
"setTexCoord",
"(",
"String",
"texName",
",",
"String",
"texCoordAttr",
",",
"String",
"shaderVarName",
")",
"{",
"synchronized",
"(",
"textures",
")",
"{",
"GVRTexture",
"tex",
"=",
"textures",
".",
"get",
"(",
"texName",
")",
";",
"if",
... | Designate the vertex attribute and shader variable for the texture coordinates
associated with the named texture.
@param texName name of texture
@param texCoordAttr name of vertex attribute with texture coordinates.
@param shaderVarName name of shader variable to get texture coordinates. | [
"Designate",
"the",
"vertex",
"attribute",
"and",
"shader",
"variable",
"for",
"the",
"texture",
"coordinates",
"associated",
"with",
"the",
"named",
"texture",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderData.java#L465-L480 |
161,785 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderData.java | GVRShaderData.getTexCoordAttr | public String getTexCoordAttr(String texName)
{
GVRTexture tex = textures.get(texName);
if (tex != null)
{
return tex.getTexCoordAttr();
}
return null;
} | java | public String getTexCoordAttr(String texName)
{
GVRTexture tex = textures.get(texName);
if (tex != null)
{
return tex.getTexCoordAttr();
}
return null;
} | [
"public",
"String",
"getTexCoordAttr",
"(",
"String",
"texName",
")",
"{",
"GVRTexture",
"tex",
"=",
"textures",
".",
"get",
"(",
"texName",
")",
";",
"if",
"(",
"tex",
"!=",
"null",
")",
"{",
"return",
"tex",
".",
"getTexCoordAttr",
"(",
")",
";",
"}"... | Gets the name of the vertex attribute containing the texture
coordinates for the named texture.
@param texName name of texture
@return name of texture coordinate vertex attribute | [
"Gets",
"the",
"name",
"of",
"the",
"vertex",
"attribute",
"containing",
"the",
"texture",
"coordinates",
"for",
"the",
"named",
"texture",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderData.java#L489-L497 |
161,786 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderData.java | GVRShaderData.getTexCoordShaderVar | public String getTexCoordShaderVar(String texName)
{
GVRTexture tex = textures.get(texName);
if (tex != null)
{
return tex.getTexCoordShaderVar();
}
return null;
} | java | public String getTexCoordShaderVar(String texName)
{
GVRTexture tex = textures.get(texName);
if (tex != null)
{
return tex.getTexCoordShaderVar();
}
return null;
} | [
"public",
"String",
"getTexCoordShaderVar",
"(",
"String",
"texName",
")",
"{",
"GVRTexture",
"tex",
"=",
"textures",
".",
"get",
"(",
"texName",
")",
";",
"if",
"(",
"tex",
"!=",
"null",
")",
"{",
"return",
"tex",
".",
"getTexCoordShaderVar",
"(",
")",
... | Gets the name of the shader variable to get the texture
coordinates for the named texture.
@param texName name of texture
@return name of shader variable | [
"Gets",
"the",
"name",
"of",
"the",
"shader",
"variable",
"to",
"get",
"the",
"texture",
"coordinates",
"for",
"the",
"named",
"texture",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderData.java#L506-L514 |
161,787 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPreference.java | GVRPreference.getProperty | public String getProperty(String key, String defaultValue) {
return mProperties.getProperty(key, defaultValue);
} | java | public String getProperty(String key, String defaultValue) {
return mProperties.getProperty(key, defaultValue);
} | [
"public",
"String",
"getProperty",
"(",
"String",
"key",
",",
"String",
"defaultValue",
")",
"{",
"return",
"mProperties",
".",
"getProperty",
"(",
"key",
",",
"defaultValue",
")",
";",
"}"
] | Gets a property with a default value.
@param key
The key string.
@param defaultValue
The default value.
@return The property string. | [
"Gets",
"a",
"property",
"with",
"a",
"default",
"value",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPreference.java#L63-L65 |
161,788 | Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/PickerWidget.java | PickerWidget.hide | public synchronized void hide() {
if (focusedQuad != null) {
mDefocusAnimationFactory.create(focusedQuad)
.setRequestLayoutOnTargetChange(false)
.start().finish();
focusedQuad = null;
}
Log.d(Log.SUBSYSTEM.WIDGET, TAG, "hide Picke... | java | public synchronized void hide() {
if (focusedQuad != null) {
mDefocusAnimationFactory.create(focusedQuad)
.setRequestLayoutOnTargetChange(false)
.start().finish();
focusedQuad = null;
}
Log.d(Log.SUBSYSTEM.WIDGET, TAG, "hide Picke... | [
"public",
"synchronized",
"void",
"hide",
"(",
")",
"{",
"if",
"(",
"focusedQuad",
"!=",
"null",
")",
"{",
"mDefocusAnimationFactory",
".",
"create",
"(",
"focusedQuad",
")",
".",
"setRequestLayoutOnTargetChange",
"(",
"false",
")",
".",
"start",
"(",
")",
"... | It should be called when the picker is hidden | [
"It",
"should",
"be",
"called",
"when",
"the",
"picker",
"is",
"hidden"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/PickerWidget.java#L68-L78 |
161,789 | Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFString.java | MFString.set1Value | public void set1Value(int index, String newValue) {
try {
value.set( index, newValue );
}
catch (IndexOutOfBoundsException e) {
Log.e(TAG, "X3D MFString set1Value(int index, ...) out of bounds." + e);
}
catch (Exception e) {
Log.e(TAG, "X3D MFS... | java | public void set1Value(int index, String newValue) {
try {
value.set( index, newValue );
}
catch (IndexOutOfBoundsException e) {
Log.e(TAG, "X3D MFString set1Value(int index, ...) out of bounds." + e);
}
catch (Exception e) {
Log.e(TAG, "X3D MFS... | [
"public",
"void",
"set1Value",
"(",
"int",
"index",
",",
"String",
"newValue",
")",
"{",
"try",
"{",
"value",
".",
"set",
"(",
"index",
",",
"newValue",
")",
";",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"Log",
".",
"e",
"(",
"T... | Replace a single value at the appropriate location in the existing value array.
@param index - location in the array list
@param newValue - the new String | [
"Replace",
"a",
"single",
"value",
"at",
"the",
"appropriate",
"location",
"in",
"the",
"existing",
"value",
"array",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFString.java#L128-L138 |
161,790 | Samsung/GearVRf | GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFString.java | MFString.setValue | public void setValue(int numStrings, String[] newValues) {
value.clear();
if (numStrings == newValues.length) {
for (int i = 0; i < newValues.length; i++) {
value.add(newValues[i]);
}
}
else {
Log.e(TAG, "X3D MFString setValue() numStri... | java | public void setValue(int numStrings, String[] newValues) {
value.clear();
if (numStrings == newValues.length) {
for (int i = 0; i < newValues.length; i++) {
value.add(newValues[i]);
}
}
else {
Log.e(TAG, "X3D MFString setValue() numStri... | [
"public",
"void",
"setValue",
"(",
"int",
"numStrings",
",",
"String",
"[",
"]",
"newValues",
")",
"{",
"value",
".",
"clear",
"(",
")",
";",
"if",
"(",
"numStrings",
"==",
"newValues",
".",
"length",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";"... | Assign a new value to this field.
@param numStrings - number of strings
@param newValues - the new strings | [
"Assign",
"a",
"new",
"value",
"to",
"this",
"field",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFString.java#L145-L155 |
161,791 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRBitmapImage.java | GVRBitmapImage.update | public void update(int width, int height, byte[] grayscaleData)
{
NativeBitmapImage.updateFromMemory(getNative(), width, height, grayscaleData);
} | java | public void update(int width, int height, byte[] grayscaleData)
{
NativeBitmapImage.updateFromMemory(getNative(), width, height, grayscaleData);
} | [
"public",
"void",
"update",
"(",
"int",
"width",
",",
"int",
"height",
",",
"byte",
"[",
"]",
"grayscaleData",
")",
"{",
"NativeBitmapImage",
".",
"updateFromMemory",
"(",
"getNative",
"(",
")",
",",
"width",
",",
"height",
",",
"grayscaleData",
")",
";",
... | Copy new grayscale data to the GPU texture. This one is also safe even
in a non-GL thread. An updateGPU request on a non-GL thread will
be forwarded to the GL thread and be executed before main rendering happens.
Be aware that updating a texture will affect any and all
{@linkplain GVRMaterial materials} and/or post ef... | [
"Copy",
"new",
"grayscale",
"data",
"to",
"the",
"GPU",
"texture",
".",
"This",
"one",
"is",
"also",
"safe",
"even",
"in",
"a",
"non",
"-",
"GL",
"thread",
".",
"An",
"updateGPU",
"request",
"on",
"a",
"non",
"-",
"GL",
"thread",
"will",
"be",
"forwa... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRBitmapImage.java#L228-L231 |
161,792 | Samsung/GearVRf | GVRf/Extensions/platformsdk_support/src/main/java/org/gearvrf/PlatformEntitlementCheck.java | PlatformEntitlementCheck.start | public static void start(final GVRContext context, final String appId, final ResultListener listener) {
if (null == listener) {
throw new IllegalArgumentException("listener cannot be null");
}
final Activity activity = context.getActivity();
final long result = create(activi... | java | public static void start(final GVRContext context, final String appId, final ResultListener listener) {
if (null == listener) {
throw new IllegalArgumentException("listener cannot be null");
}
final Activity activity = context.getActivity();
final long result = create(activi... | [
"public",
"static",
"void",
"start",
"(",
"final",
"GVRContext",
"context",
",",
"final",
"String",
"appId",
",",
"final",
"ResultListener",
"listener",
")",
"{",
"if",
"(",
"null",
"==",
"listener",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
... | Starts asynchronous check. Result will be delivered to the listener on the main thread.
@param context
@param appId application id from the oculus dashboard
@param listener listener to invoke when the result is available
@throws IllegalStateException in case the platform sdk cannot be initialized
@throws IllegalArgume... | [
"Starts",
"asynchronous",
"check",
".",
"Result",
"will",
"be",
"delivered",
"to",
"the",
"listener",
"on",
"the",
"main",
"thread",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/platformsdk_support/src/main/java/org/gearvrf/PlatformEntitlementCheck.java#L55-L93 |
161,793 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/debug/GVRFPSTracer.java | GVRFPSTracer.tick | public synchronized void tick() {
long currentTime = GVRTime.getMilliTime();
long cutoffTime = currentTime - BUFFER_SECONDS * 1000;
ListIterator<Long> it = mTimestamps.listIterator();
while (it.hasNext()) {
Long timestamp = it.next();
if (timestamp < cutoffTime) {... | java | public synchronized void tick() {
long currentTime = GVRTime.getMilliTime();
long cutoffTime = currentTime - BUFFER_SECONDS * 1000;
ListIterator<Long> it = mTimestamps.listIterator();
while (it.hasNext()) {
Long timestamp = it.next();
if (timestamp < cutoffTime) {... | [
"public",
"synchronized",
"void",
"tick",
"(",
")",
"{",
"long",
"currentTime",
"=",
"GVRTime",
".",
"getMilliTime",
"(",
")",
";",
"long",
"cutoffTime",
"=",
"currentTime",
"-",
"BUFFER_SECONDS",
"*",
"1000",
";",
"ListIterator",
"<",
"Long",
">",
"it",
"... | Should be called each frame. | [
"Should",
"be",
"called",
"each",
"frame",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/GVRFPSTracer.java#L54-L69 |
161,794 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/VrAppSettings.java | VrAppSettings.addControllerType | public void addControllerType(GVRControllerType controllerType)
{
if (cursorControllerTypes == null)
{
cursorControllerTypes = new ArrayList<GVRControllerType>();
}
else if (cursorControllerTypes.contains(controllerType))
{
return;
}
cu... | java | public void addControllerType(GVRControllerType controllerType)
{
if (cursorControllerTypes == null)
{
cursorControllerTypes = new ArrayList<GVRControllerType>();
}
else if (cursorControllerTypes.contains(controllerType))
{
return;
}
cu... | [
"public",
"void",
"addControllerType",
"(",
"GVRControllerType",
"controllerType",
")",
"{",
"if",
"(",
"cursorControllerTypes",
"==",
"null",
")",
"{",
"cursorControllerTypes",
"=",
"new",
"ArrayList",
"<",
"GVRControllerType",
">",
"(",
")",
";",
"}",
"else",
... | Enable the use of the given controller type by
adding it to the cursor controller types list.
@param controllerType GVRControllerType to add to the list | [
"Enable",
"the",
"use",
"of",
"the",
"given",
"controller",
"type",
"by",
"adding",
"it",
"to",
"the",
"cursor",
"controller",
"types",
"list",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/VrAppSettings.java#L627-L638 |
161,795 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Assert.java | Assert.checkStringNotNullOrEmpty | public static void checkStringNotNullOrEmpty(String parameterName,
String value) {
if (TextUtils.isEmpty(value)) {
throw Exceptions.IllegalArgument("Current input string %s is %s.",
parameterName, value == null ? "null" : "empty");
}
} | java | public static void checkStringNotNullOrEmpty(String parameterName,
String value) {
if (TextUtils.isEmpty(value)) {
throw Exceptions.IllegalArgument("Current input string %s is %s.",
parameterName, value == null ? "null" : "empty");
}
} | [
"public",
"static",
"void",
"checkStringNotNullOrEmpty",
"(",
"String",
"parameterName",
",",
"String",
"value",
")",
"{",
"if",
"(",
"TextUtils",
".",
"isEmpty",
"(",
"value",
")",
")",
"{",
"throw",
"Exceptions",
".",
"IllegalArgument",
"(",
"\"Current input s... | Check that the parameter string is not null or empty
@param value
String value to be checked.
@param parameterName
The name of the user-supplied parameter that we are validating
so that the user can easily find the error in their code.
@throws IllegalArgumentException
If the key is null or empty. | [
"Check",
"that",
"the",
"parameter",
"string",
"is",
"not",
"null",
"or",
"empty"
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Assert.java#L65-L71 |
161,796 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Assert.java | Assert.checkArrayLength | public static void checkArrayLength(String parameterName, int actualLength,
int expectedLength) {
if (actualLength != expectedLength) {
throw Exceptions.IllegalArgument(
"Array %s should have %d elements, not %d", parameterName,
expectedLength, act... | java | public static void checkArrayLength(String parameterName, int actualLength,
int expectedLength) {
if (actualLength != expectedLength) {
throw Exceptions.IllegalArgument(
"Array %s should have %d elements, not %d", parameterName,
expectedLength, act... | [
"public",
"static",
"void",
"checkArrayLength",
"(",
"String",
"parameterName",
",",
"int",
"actualLength",
",",
"int",
"expectedLength",
")",
"{",
"if",
"(",
"actualLength",
"!=",
"expectedLength",
")",
"{",
"throw",
"Exceptions",
".",
"IllegalArgument",
"(",
"... | Check that the parameter array has exactly the right number of elements.
@param parameterName
The name of the user-supplied parameter that we are validating
so that the user can easily find the error in their code.
@param actualLength
The actual array length
@param expectedLength
The expected array length | [
"Check",
"that",
"the",
"parameter",
"array",
"has",
"exactly",
"the",
"right",
"number",
"of",
"elements",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Assert.java#L84-L91 |
161,797 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Assert.java | Assert.checkMinimumArrayLength | public static void checkMinimumArrayLength(String parameterName,
int actualLength, int minimumLength) {
if (actualLength < minimumLength) {
throw Exceptions
.IllegalArgument(
"Array %s should have at least %d elements, but it only has %d",
... | java | public static void checkMinimumArrayLength(String parameterName,
int actualLength, int minimumLength) {
if (actualLength < minimumLength) {
throw Exceptions
.IllegalArgument(
"Array %s should have at least %d elements, but it only has %d",
... | [
"public",
"static",
"void",
"checkMinimumArrayLength",
"(",
"String",
"parameterName",
",",
"int",
"actualLength",
",",
"int",
"minimumLength",
")",
"{",
"if",
"(",
"actualLength",
"<",
"minimumLength",
")",
"{",
"throw",
"Exceptions",
".",
"IllegalArgument",
"(",... | Check that the parameter array has at least as many elements as it
should.
@param parameterName
The name of the user-supplied parameter that we are validating
so that the user can easily find the error in their code.
@param actualLength
The actual array length
@param minimumLength
The minimum array length | [
"Check",
"that",
"the",
"parameter",
"array",
"has",
"at",
"least",
"as",
"many",
"elements",
"as",
"it",
"should",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Assert.java#L267-L275 |
161,798 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Assert.java | Assert.checkFloatNotNaNOrInfinity | public static void checkFloatNotNaNOrInfinity(String parameterName,
float data) {
if (Float.isNaN(data) || Float.isInfinite(data)) {
throw Exceptions.IllegalArgument(
"%s should never be NaN or Infinite.", parameterName);
}
} | java | public static void checkFloatNotNaNOrInfinity(String parameterName,
float data) {
if (Float.isNaN(data) || Float.isInfinite(data)) {
throw Exceptions.IllegalArgument(
"%s should never be NaN or Infinite.", parameterName);
}
} | [
"public",
"static",
"void",
"checkFloatNotNaNOrInfinity",
"(",
"String",
"parameterName",
",",
"float",
"data",
")",
"{",
"if",
"(",
"Float",
".",
"isNaN",
"(",
"data",
")",
"||",
"Float",
".",
"isInfinite",
"(",
"data",
")",
")",
"{",
"throw",
"Exceptions... | In common shader cases, NaN makes little sense. Correspondingly, GVRF is
going to use Float.NaN as illegal flag in many cases. Therefore, we need
a function to check if there is any setX that is using NaN as input.
@param parameterName
The name of the user-supplied parameter that we are validating
so that the user can... | [
"In",
"common",
"shader",
"cases",
"NaN",
"makes",
"little",
"sense",
".",
"Correspondingly",
"GVRF",
"is",
"going",
"to",
"use",
"Float",
".",
"NaN",
"as",
"illegal",
"flag",
"in",
"many",
"cases",
".",
"Therefore",
"we",
"need",
"a",
"function",
"to",
... | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/Assert.java#L686-L692 |
161,799 | Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRPose.java | GVRPose.transformPose | public void transformPose(Matrix4f trans)
{
Bone bone = mBones[0];
bone.LocalMatrix.set(trans);
bone.WorldMatrix.set(trans);
bone.Changed = WORLD_POS | WORLD_ROT;
mNeedSync = true;
sync();
} | java | public void transformPose(Matrix4f trans)
{
Bone bone = mBones[0];
bone.LocalMatrix.set(trans);
bone.WorldMatrix.set(trans);
bone.Changed = WORLD_POS | WORLD_ROT;
mNeedSync = true;
sync();
} | [
"public",
"void",
"transformPose",
"(",
"Matrix4f",
"trans",
")",
"{",
"Bone",
"bone",
"=",
"mBones",
"[",
"0",
"]",
";",
"bone",
".",
"LocalMatrix",
".",
"set",
"(",
"trans",
")",
";",
"bone",
".",
"WorldMatrix",
".",
"set",
"(",
"trans",
")",
";",
... | Transform the root bone of the pose by the given matrix.
@param trans matrix to transform the pose by. | [
"Transform",
"the",
"root",
"bone",
"of",
"the",
"pose",
"by",
"the",
"given",
"matrix",
"."
] | 05034d465a7b0a494fabb9e9f2971ac19392f32d | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRPose.java#L690-L699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.