buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public GL10 getGL() { if( gl == null ) gl = new JoglGL10(GLContext.getCurrent().getGL()); return gl; } }
public GL10 getGL() { if( gl == null ) gl = new JoglGL11(GLContext.getCurrent().getGL()); return gl; } }
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(layout.issue_dashboard); setTitle(string.dashboard_issues_title); getSupportActionBar().setDisplayHomeAsUpEnabled(true); pager.setAdapter(new IssueDashboardPagerAdapter(ge...
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(layout.issue_dashboard); setTitle(string.dashboard_issues_title); getSupportActionBar().setDisplayHomeAsUpEnabled(true); pager.setAdapter(new IssueDashboardPagerAdapter(ge...
protected ExplainResponse shardOperation(ExplainRequest request, int shardId) throws ElasticsearchException { IndexService indexService = indicesService.indexService(request.index()); IndexShard indexShard = indexService.shardSafe(shardId); Term uidTerm = new Term(UidFieldMapper.NAME, Uid.cr...
protected ExplainResponse shardOperation(ExplainRequest request, int shardId) throws ElasticsearchException { IndexService indexService = indicesService.indexService(request.index()); IndexShard indexShard = indexService.shardSafe(shardId); Term uidTerm = new Term(UidFieldMapper.NAME, Uid.cr...
protected GetResponse shardOperation(GetRequest request, int shardId) throws ElasticsearchException { IndexService indexService = indicesService.indexServiceSafe(request.index()); IndexShard indexShard = indexService.shardSafe(shardId); if (request.refresh() && !request.realtime()) { ...
protected GetResponse shardOperation(GetRequest request, int shardId) throws ElasticsearchException { IndexService indexService = indicesService.indexServiceSafe(request.index()); IndexShard indexShard = indexService.shardSafe(shardId); if (request.refresh() && !request.realtime()) { ...
protected MultiGetShardResponse shardOperation(MultiGetShardRequest request, int shardId) throws ElasticsearchException { IndexService indexService = indicesService.indexServiceSafe(request.index()); IndexShard indexShard = indexService.shardSafe(shardId); if (request.refresh() && !request....
protected MultiGetShardResponse shardOperation(MultiGetShardRequest request, int shardId) throws ElasticsearchException { IndexService indexService = indicesService.indexServiceSafe(request.index()); IndexShard indexShard = indexService.shardSafe(shardId); if (request.refresh() && !request....
public Result prepare(UpdateRequest request, IndexShard indexShard) { long getDate = System.currentTimeMillis(); final GetResult getResult = indexShard.getService().get(request.type(), request.id(), new String[]{RoutingFieldMapper.NAME, ParentFieldMapper.NAME, TTLFieldMapper.NAME}, ...
public Result prepare(UpdateRequest request, IndexShard indexShard) { long getDate = System.currentTimeMillis(); final GetResult getResult = indexShard.getService().get(request.type(), request.id(), new String[]{RoutingFieldMapper.NAME, ParentFieldMapper.NAME, TTLFieldMapper.NAME}, ...
private Fields generateTermVectorsIfNeeded(Fields termVectorsByField, TermVectorRequest request, Term uidTerm, boolean realTime) throws IOException { List<String> validFields = new ArrayList<>(); for (String field : request.selectedFields()) { FieldMapper fieldMapper = indexShard.mapperS...
private Fields generateTermVectorsIfNeeded(Fields termVectorsByField, TermVectorRequest request, Term uidTerm, boolean realTime) throws IOException { List<String> validFields = new ArrayList<>(); for (String field : request.selectedFields()) { FieldMapper fieldMapper = indexShard.mapperS...
@Inject public IndicesQueriesRegistry(Settings settings) { Map<String, QueryParser> queryParsers = Maps.newHashMap(); addQueryParser(queryParsers, new TextQueryParser()); addQueryParser(queryParsers, new NestedQueryParser()); addQueryParser(queryParsers, new HasChildQueryParser()); ...
@Inject public IndicesQueriesRegistry(Settings settings) { Map<String, QueryParser> queryParsers = Maps.newHashMap(); addQueryParser(queryParsers, new TextQueryParser()); addQueryParser(queryParsers, new NestedQueryParser()); addQueryParser(queryParsers, new HasChildQueryParser()); ...
private static final String[] MARKDOWN_EXTENSIONS = {"md", "mkdn", "mdwn", "mdown", "markdown"};
private static final String[] MARKDOWN_EXTENSIONS = {"md", "mkdn", "mdwn", "mdown", "markdown", "mkd", "mkdown", "ron"};
private void addMoreLikeThis(MoreLikeThisRequest request, BoolJsonQueryBuilder boolBuilder, String fieldName, String likeText) { MoreLikeThisFieldJsonQueryBuilder mlt = moreLikeThisFieldQuery(fieldName) .likeText(likeText) .percentTermsToMatch(request.percentTermsToMatch()) ...
private void addMoreLikeThis(MoreLikeThisRequest request, BoolJsonQueryBuilder boolBuilder, String fieldName, String likeText) { MoreLikeThisFieldJsonQueryBuilder mlt = moreLikeThisFieldQuery(fieldName) .likeText(likeText) .percentTermsToMatch(request.percentTermsToMatch()) ...
@Override public void toJson(JsonBuilder builder, Params params) throws IOException { if (scrollId != null) { builder.field("_scrollId", scrollId); } builder.startObject("_shards"); builder.field("total", totalShards()); builder.field("successful", successfulShard...
@Override public void toJson(JsonBuilder builder, Params params) throws IOException { if (scrollId != null) { builder.field("_scrollId", scrollId); } builder.startObject("_shards"); builder.field("total", totalShards()); builder.field("successful", successfulShard...
@Inject public DiscoveryService(Settings settings, Discovery discovery) { super(settings); this.discovery = discovery; this.initialStateTimeout = componentSettings.getAsTime("initialStateTimeout", TimeValue.timeValueSeconds(30)); }
@Inject public DiscoveryService(Settings settings, Discovery discovery) { super(settings); this.discovery = discovery; this.initialStateTimeout = componentSettings.getAsTime("initial_state_timeout", TimeValue.timeValueSeconds(30)); }
@Inject public GatewayService(Settings settings, Gateway gateway, ClusterService clusterService, DiscoveryService discoveryService, ThreadPool threadPool, MetaDataService metaDataService) { super(settings); this.gateway = gateway; this.clusterService = clust...
@Inject public GatewayService(Settings settings, Gateway gateway, ClusterService clusterService, DiscoveryService discoveryService, ThreadPool threadPool, MetaDataService metaDataService) { super(settings); this.gateway = gateway; this.clusterService = clust...
@Inject public BrazilianAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stopWords = settings.getAsArray("stopwords"); if (stopWords.length > 0) { this.stopWords ...
@Inject public BrazilianAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stopWords = settings.getAsArray("stopwords"); if (stopWords.length > 0) { this.stopWords ...
@Inject public BrazilianStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stemExclusion = settings.getAsArray("stemExclusion"); if (stemExclusion.length > 0) { ...
@Inject public BrazilianStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stemExclusion = settings.getAsArray("stem_exclusion"); if (stemExclusion.length > 0) { ...
@Inject public DutchAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stopWords = settings.getAsArray("stopwords"); if (stopWords.length > 0) { this.stopWords = Im...
@Inject public DutchAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stopWords = settings.getAsArray("stopwords"); if (stopWords.length > 0) { this.stopWords = Im...
@Inject public DutchStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stemExclusion = settings.getAsArray("stemExclusion"); if (stemExclusion.length > 0) { t...
@Inject public DutchStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stemExclusion = settings.getAsArray("stem_exclusion"); if (stemExclusion.length > 0) { ...
@Inject public FrenchAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stopWords = settings.getAsArray("stopwords"); if (stopWords.length > 0) { this.stopWords = I...
@Inject public FrenchAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stopWords = settings.getAsArray("stopwords"); if (stopWords.length > 0) { this.stopWords = I...
@Inject public FrenchStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stemExclusion = settings.getAsArray("stemExclusion"); if (stemExclusion.length > 0) { ...
@Inject public FrenchStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stemExclusion = settings.getAsArray("stem_exclusion"); if (stemExclusion.length > 0) { ...
@Inject public GermanAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stopWords = settings.getAsArray("stopwords"); if (stopWords.length > 0) { this.stopWords = I...
@Inject public GermanAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stopWords = settings.getAsArray("stopwords"); if (stopWords.length > 0) { this.stopWords = I...
@Inject public GermanStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stemExclusion = settings.getAsArray("stemExclusion"); if (stemExclusion.length > 0) { ...
@Inject public GermanStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stemExclusion = settings.getAsArray("stem_exclusion"); if (stemExclusion.length > 0) { ...
@Inject public KeywordTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); bufferSize = settings.getAsInt("bufferSize", 256); }
@Inject public KeywordTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); bufferSize = settings.getAsInt("buffer_size", 256); }
@Inject public StandardAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stopWords = settings.getAsArray("stopwords"); if (stopWords.length > 0) { this.stopWords =...
@Inject public StandardAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); String[] stopWords = settings.getAsArray("stopwords"); if (stopWords.length > 0) { this.stopWords =...
@Inject public StandardTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); maxTokenLength = settings.getAsInt("maxTokenLength", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH); }
@Inject public StandardTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) { super(index, indexSettings, name); maxTokenLength = settings.getAsInt("max_token_length", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH); }
protected AbstractConcurrentMapFilterCache(Index index, @IndexSettings Settings indexSettings, ThreadPool threadPool) { super(index, indexSettings); this.readerCleanerSchedule = componentSettings.getAsTime("readerCleanerSchedule", TimeValue.timeValueMinutes(1)); logger.debug("Using [" + ty...
protected AbstractConcurrentMapFilterCache(Index index, @IndexSettings Settings indexSettings, ThreadPool threadPool) { super(index, indexSettings); this.readerCleanerSchedule = componentSettings.getAsTime("reader_cleaner_schedule", TimeValue.timeValueMinutes(1)); logger.debug("Using [" + ...
@Inject public MapperService(Index index, @IndexSettings Settings indexSettings, Environment environment, AnalysisService analysisService) { super(index, indexSettings); this.documentParser = new JsonDocumentMapperParser(analysisService); this.searchAnalyzer = new SmartIndexNameSearchAnalyze...
@Inject public MapperService(Index index, @IndexSettings Settings indexSettings, Environment environment, AnalysisService analysisService) { super(index, indexSettings); this.documentParser = new JsonDocumentMapperParser(analysisService); this.searchAnalyzer = new SmartIndexNameSearchAnalyze...
@Override public void toJson(JsonBuilder builder, Params params) throws IOException { builder.startObject(names.name()); builder.field("type", jsonType()); builder.field("indexName", names.indexNameClean()); builder.endObject(); }
@Override public void toJson(JsonBuilder builder, Params params) throws IOException { builder.startObject(names.name()); builder.field("type", jsonType()); builder.field("index_name", names.indexNameClean()); builder.endObject(); }
@Override public void toJson(JsonBuilder builder, Params params) throws IOException { builder.startObject(jsonType()); builder.field("name", name()); if (nullValue != null) { builder.field("nullValue", nullValue); } builder.endObject(); }
@Override public void toJson(JsonBuilder builder, Params params) throws IOException { builder.startObject(jsonType()); builder.field("name", name()); if (nullValue != null) { builder.field("null_value", nullValue); } builder.endObject(); }
public static void parseJsonField(JsonFieldMapper.Builder builder, String name, ObjectNode fieldNode, JsonTypeParser.ParserContext parserContext) { for (Iterator<Map.Entry<String, JsonNode>> propsIt = fieldNode.getFields(); propsIt.hasNext();) { Map.Entry<String, JsonNode> entry = propsIt.next()...
public static void parseJsonField(JsonFieldMapper.Builder builder, String name, ObjectNode fieldNode, JsonTypeParser.ParserContext parserContext) { for (Iterator<Map.Entry<String, JsonNode>> propsIt = fieldNode.getFields(); propsIt.hasNext();) { Map.Entry<String, JsonNode> entry = propsIt.next()...
@Override protected void doJson(JsonBuilder builder, Params params) throws IOException { builder.startObject("bool"); for (Clause clause : clauses) { if (clause.occur == BooleanClause.Occur.MUST) { builder.field("must"); clause.filterBuilder.toJson(builder...
@Override protected void doJson(JsonBuilder builder, Params params) throws IOException { builder.startObject("bool"); for (Clause clause : clauses) { if (clause.occur == BooleanClause.Occur.MUST) { builder.field("must"); clause.filterBuilder.toJson(builder...
@Override public void doJson(JsonBuilder builder, Params params) throws IOException { builder.startObject(MatchAllJsonQueryParser.NAME); if (boost != -1) { builder.field("boost", boost); } if (normsField != null) { builder.field("normsField", normsField); ...
@Override public void doJson(JsonBuilder builder, Params params) throws IOException { builder.startObject(MatchAllJsonQueryParser.NAME); if (boost != -1) { builder.field("boost", boost); } if (normsField != null) { builder.field("norms_field", normsField); ...
@Inject public MmapFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componentS...
@Inject public MmapFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componentS...
@Inject public NioFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componentSe...
@Inject public NioFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componentSe...
@Inject public SimpleFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componen...
@Inject public SimpleFsStore(ShardId shardId, @IndexSettings Settings indexSettings, Environment environment, @LocalNodeId String localNodeId) throws IOException { super(shardId, indexSettings); // by default, we don't need to sync to disk, since we use the gateway this.syncToDisk = componen...
@Inject public DumpMonitorService(Settings settings, Environment environment, @Nullable ClusterService clusterService, @Nullable Map<String, DumpContributorFactory> contributors) { super(settings); this.clusterService = clusterService; this.contributors ...
@Inject public DumpMonitorService(Settings settings, Environment environment, @Nullable ClusterService clusterService, @Nullable Map<String, DumpContributorFactory> contributors) { super(settings); this.clusterService = clusterService; this.contributors ...
@Override public void handleRequest(RestRequest request, RestChannel channel) { try { JsonBuilder builder = RestJsonBuilder.restJsonBuilder(request).prettyPrint(); builder.startObject(); builder.field("ok", true); if (settings.get("name") != null) { ...
@Override public void handleRequest(RestRequest request, RestChannel channel) { try { JsonBuilder builder = RestJsonBuilder.restJsonBuilder(request).prettyPrint(); builder.startObject(); builder.field("ok", true); if (settings.get("name") != null) { ...
@Inject public SearchService(Settings settings, ClusterService clusterService, IndicesService indicesService, TimerService timerService, DfsPhase dfsPhase, QueryPhase queryPhase, FetchPhase fetchPhase) { super(settings); this.clusterService = clusterService; ...
@Inject public SearchService(Settings settings, ClusterService clusterService, IndicesService indicesService, TimerService timerService, DfsPhase dfsPhase, QueryPhase queryPhase, FetchPhase fetchPhase) { super(settings); this.clusterService = clusterService; ...
@Override public void toJson(JsonBuilder builder, Params params) throws IOException { if (queryExecution == null && queryFacets == null) { return; } builder.field("facets"); builder.startObject(); if (queryExecution != null) { builder.field("queryExe...
@Override public void toJson(JsonBuilder builder, Params params) throws IOException { if (queryExecution == null && queryFacets == null) { return; } builder.field("facets"); builder.startObject(); if (queryExecution != null) { builder.field("query_ex...
@Inject public TimerService(Settings settings, ThreadPool threadPool) { super(settings); this.threadPool = threadPool; this.timeEstimator = new TimeEstimator(); this.timeEstimatorFuture = threadPool.scheduleWithFixedDelay(timeEstimator, 50, 50, TimeUnit.MILLISECONDS); this....
@Inject public TimerService(Settings settings, ThreadPool threadPool) { super(settings); this.threadPool = threadPool; this.timeEstimator = new TimeEstimator(); this.timeEstimatorFuture = threadPool.scheduleWithFixedDelay(timeEstimator, 50, 50, TimeUnit.MILLISECONDS); this....
@Test public void testSimpleMoreLikeThis() throws Exception { logger.info("Creating index test"); client1.admin().indices().create(createIndexRequest("test")).actionGet(); logger.info("Running Cluster Health"); ClusterHealthResponse clusterHealth = client1.admin().cluster().health(c...
@Test public void testSimpleMoreLikeThis() throws Exception { logger.info("Creating index test"); client1.admin().indices().create(createIndexRequest("test")).actionGet(); logger.info("Running Cluster Health"); ClusterHealthResponse clusterHealth = client1.admin().cluster().health(c...
public Bundle addAccount(final AccountAuthenticatorResponse response, final String accountType, final String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { final Intent intent = new Intent(context, LoginActivity.class); in...
public Bundle addAccount(final AccountAuthenticatorResponse response, final String accountType, final String authTokenType, final String[] requiredFeatures, final Bundle options) throws NetworkErrorException { final Intent intent = new Intent(context, LoginActivity.class)...
public void process(MetaData metaData, @Nullable MappingMetaData mappingMd, boolean allowIdGeneration, String concreteIndex) throws ElasticsearchException { // resolve the routing if needed routing(metaData.resolveIndexRouting(routing, index)); // resolve timestamp if provided externally ...
public void process(MetaData metaData, @Nullable MappingMetaData mappingMd, boolean allowIdGeneration, String concreteIndex) throws ElasticsearchException { // resolve the routing if needed routing(metaData.resolveIndexRouting(routing, index)); // resolve timestamp if provided externally ...
public void create () { stage = new Stage(0, 0, false, new SpriteBatch()); Gdx.input.setInputProcessor(stage); skin = new Skin(Gdx.files.internal("data/uiskin.json")); for (int i = 0; i < 500; i++) { TextButton t = new TextButton("Button"+i, skin); t.setX(MathUtils.random(0, Gdx.graphics.getWidth())); ...
public void create () { stage = new Stage(0, 0, false, new SpriteBatch()); Gdx.input.setInputProcessor(stage); skin = new Skin(Gdx.files.internal("data/uiskin.json")); for (int i = 0; i < 1; i++) { TextButton t = new TextButton("Button"+i, skin); t.setX(MathUtils.random(0, Gdx.graphics.getWidth())); t...
protected void checkStateMeetsSettingsAndMaybeRecover(ClusterState state, boolean asyncRecovery) { DiscoveryNodes nodes = state.nodes(); if (state.blocks().hasGlobalBlock(Discovery.NO_MASTER_BLOCK)) { logger.debug("not recovering from gateway, no master elected yet"); } else if (...
protected void checkStateMeetsSettingsAndMaybeRecover(ClusterState state, boolean asyncRecovery) { DiscoveryNodes nodes = state.nodes(); if (state.blocks().hasGlobalBlock(discoveryService.getNoMasterBlock())) { logger.debug("not recovering from gateway, no master elected yet"); }...
@Override public Music newMusic (FileHandle file) { try { JoglMusic music = new JoglMusic(((JoglFileHandle)file)); return music; } catch (Exception e) { throw new GdxRuntimeException("Couldn't create Music instance from file '" + file + "'", e); } }
@Override public Music newMusic (FileHandle file) { try { JoglMusic music = new JoglMusic(((JoglFileHandle)file)); return music; } catch (Throwable e) { throw new GdxRuntimeException("Couldn't create Music instance from file '" + file + "'", e); } }
public Music newMusic (FileHandle file) { try { LwjglMusic music = new LwjglMusic(((LwjglFileHandle)file)); return music; } catch (Exception e) { throw new GdxRuntimeException("Couldn't create Music instance from file '" + file + "'", e); } }
public Music newMusic (FileHandle file) { try { LwjglMusic music = new LwjglMusic(((LwjglFileHandle)file)); return music; } catch (Throwable e) { throw new GdxRuntimeException("Couldn't create Music instance from file '" + file + "'", e); } }
private boolean canExecute(File file) { try { Method m = File.class.getMethod("canWrite"); return (Boolean)m.invoke(file); } catch (Exception e) { return false; } }
private boolean canExecute(File file) { try { Method m = File.class.getMethod("canExecute"); return (Boolean)m.invoke(file); } catch (Exception e) { return false; } }
private Body createCircle(BodyType type, float radius, float density) { BodyDef def = new BodyDef(); def.type = type; Body box = world.createBody(def); CircleShape poly = new CircleShape(); poly.setRadius(radius); box.createFixture(poly, density); poly.dispose(); return box; }
private Body createEdge(BodyType type, float x1, float y1, float x2, float y2, float density) { BodyDef def = new BodyDef(); def.type = type; Body box = world.createBody(def); EdgeShape poly = new EdgeShape(); poly.set(new Vector2(0, 0), new Vector2(x2 - x1, y2 - y1)); box.createFixture(poly, density);...
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.SimpleStageCullingTest(), "Debug Test", 480, 320, false); }
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.Box2DTest(), "Debug Test", 480, 320, false); }
public enum ApplicationType { Android, Desktop, Applet, WebGL, iOS }
public enum ApplicationType { Android, Desktop, HeadlessDesktop, Applet, WebGL, iOS }
public static final String VERSION = "0.9.9"; }
public static final String VERSION = "1.0.0"; }
public TokenStream create(TokenStream tokenStream) { return new JapanesePartOfSpeechStopFilter(Version.LUCENE_44, tokenStream, stopTags); }
public TokenStream create(TokenStream tokenStream) { return new JapanesePartOfSpeechStopFilter(Version.LUCENE_48, tokenStream, stopTags); }
private int getInternalFormat (Pixmap.Format format) { if (format == Pixmap.Format.RGBA4444 || format == Pixmap.Format.RGBA8888 || format == Pixmap.Format.RGB565) return BufferedImage.TYPE_4BYTE_ABGR; else return BufferedImage.TYPE_BYTE_GRAY; }
private int getInternalFormat (Pixmap.Format format) { if (format == Pixmap.Format.RGBA4444 || format == Pixmap.Format.RGBA8888 || format == Pixmap.Format.RGB565) return BufferedImage.TYPE_4BYTE_ABGR_PRE; else return BufferedImage.TYPE_BYTE_GRAY; }
public Class getClassOfType () { return clazz; } /** @return the super class of this type or null */ public Type getSuperclass () { try { return ReflectionCache.forName(superClass.getName()); } catch (ClassNotFoundException e) { return null; } }
public Class getClassOfType () { return clazz; } /** @return the super class of this type or null */ public Type getSuperclass () { try { return superClass == null ? null : ReflectionCache.forName(superClass.getName()); } catch (ClassNotFoundException e) { return null; } }
public boolean act (float delta) { if (complete) return true; complete = true; Array<Action> actions = this.actions; for (int i = 0, n = actions.size; i < n; i++) if (!actions.get(i).act(delta)) complete = false; return complete; }
public boolean act (float delta) { if (complete) return true; complete = true; Array<Action> actions = this.actions; for (int i = 0, n = actions.size; i < n && actor != null; i++) if (!actions.get(i).act(delta)) complete = false; return complete; }
private VertexAttribute[] parseAttributes (JsonValue attributes) { Array<VertexAttribute> vertexAttributes = new Array<VertexAttribute>(); int unit = 0; int blendWeightCount = 0; for (JsonValue value = attributes.child; value != null; value = value.next) { String attribute = value.asString(); String attr...
private VertexAttribute[] parseAttributes (JsonValue attributes) { Array<VertexAttribute> vertexAttributes = new Array<VertexAttribute>(); int unit = 0; int blendWeightCount = 0; for (JsonValue value = attributes.child; value != null; value = value.next) { String attribute = value.asString(); String attr...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); XContentParser.Token token; boolean cache = false; CacheKeyFilter.Key cacheKey = null; String filterName = null; String cur...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); XContentParser.Token token; boolean cache = false; CacheKeyFilter.Key cacheKey = null; String filterName = null; String cur...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); boolean cache = false; CacheKeyFilter.Key cacheKey = null; String fieldName = null; List<GeoPoint> shell = Lists.newArrayList(); ...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); boolean cache = false; CacheKeyFilter.Key cacheKey = null; String fieldName = null; List<GeoPoint> shell = Lists.newArrayList(); ...
public DirectionalShadowLight (int shadowMapWidth, int shadowMapHeight, float shadowViewportWidth, float shadowViewportHeight, float shadowNear, float shadowFar) { fbo = new FrameBuffer(Format.RGBA8888, shadowMapWidth, shadowMapHeight, true); cam = new OrthographicCamera(shadowViewportWidth, shadowViewportHeight...
public DirectionalShadowLight (int shadowMapWidth, int shadowMapHeight, float shadowViewportWidth, float shadowViewportHeight, float shadowNear, float shadowFar) { fbo = new FrameBuffer(Format.RGBA8888, shadowMapWidth, shadowMapHeight, true); cam = new OrthographicCamera(shadowViewportWidth, shadowViewportHeight...
private native void jniSet (long addr, float[] verts, int offset, int len); /* b2PolygonShape* poly = (b2PolygonShape*)addr; int numVertices = len / 2; b2Vec2* verticesOut = new b2Vec2[numVertices]; for(int i = 0; i < numVertices; i++) { verticesOut[i] = b2Vec2(verts[(i<<1) + offset], verts[(i<<1) + offset...
private native void jniSet (long addr, float[] verts, int offset, int len); /* b2PolygonShape* poly = (b2PolygonShape*)addr; int numVertices = len / 2; b2Vec2* verticesOut = new b2Vec2[numVertices]; for(int i = 0; i < numVertices; i++) { verticesOut[i] = b2Vec2(verts[(i<<1) + offset], verts[(i<<1) + offset...
public float getScrollWidth () { return areaHeight; }
public float getScrollWidth () { return areaWidth; }
private void updateSrc() { DefaultMutableTreeNode previousNode; // common DefaultMutableTreeNode commonSrcNode = nodes.get("#DIR#prj-common/src"); DefaultMutableTreeNode commonSrcAppNode = nodes.get("prj-common/src/MyGame.java"); DefaultMutableTreeNode commonSrcAppGwtNode = nodes.get("prj-common/src/MyGame...
private void updateSrc() { DefaultMutableTreeNode previousNode; // common DefaultMutableTreeNode commonSrcNode = nodes.get("#DIR#prj-common/src"); DefaultMutableTreeNode commonSrcAppNode = nodes.get("prj-common/src/MyGame.java"); DefaultMutableTreeNode commonSrcAppGwtNode = nodes.get("prj-common/src/MyGame...
public void surfaceCreated(Application app) { if( model == null ) { model = MD5Loader.loadModel( app.getFiles().readFile( "data/zfat.md5mesh", FileType.Internal) ); anim = MD5Loader.loadAnimation( app.getFiles().readFile( "data/walk1.md5anim", FileType.Internal ) ); skeleton = new MD5Joints()...
public void surfaceCreated(Application app) { if( model == null ) { model = MD5Loader.loadModel( app.getFiles().readFile( "data/zfat.md5mesh", FileType.Internal) ); anim = MD5Loader.loadAnimation( app.getFiles().readFile( "data/walk1.md5anim", FileType.Internal ) ); skeleton = new MD5Joints()...
public Query rewrite(IndexReader reader) throws IOException { final Query queryRewritten = query.rewrite(reader); // CHANGE: if we push back to Lucene, would love to have an extension for "isMatchAllQuery" if (queryRewritten instanceof MatchAllDocsQuery || Queries.isConstantMatchAllQuery(qu...
public Query rewrite(IndexReader reader) throws IOException { final Query queryRewritten = query.rewrite(reader); // CHANGE: if we push back to Lucene, would love to have an extension for "isMatchAllQuery" if (queryRewritten instanceof MatchAllDocsQuery || Queries.isConstantMatchAllQuery(qu...
public void box(VertexInfo corner000, VertexInfo corner010, VertexInfo corner100, VertexInfo corner110, VertexInfo corner001, VertexInfo corner011, VertexInfo corner101, VertexInfo corner111) { ensureVertices(8); final short i000 = vertex(corner000); final short i100 = vertex(corner100); final short i110...
public void box(VertexInfo corner000, VertexInfo corner010, VertexInfo corner100, VertexInfo corner110, VertexInfo corner001, VertexInfo corner011, VertexInfo corner101, VertexInfo corner111) { ensureVertices(8); final short i000 = vertex(corner000); final short i100 = vertex(corner100); final short i110...
static private boolean isMac = System.getProperty("os.name").contains("Mac");
public TextFieldStyle (TextFieldStyle style) { this.messageFont = style.messageFont; if (style.messageFontColor != null) this.messageFontColor = new Color(style.messageFontColor); this.background = style.background; this.focusedBackground = style.focusedBackground; this.disabledBackground = style.disab...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class, ...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class, ...
public Preferences getPreferences (String name) { Preferences pref = prefs.get(name); if(pref == null) { pref = new GwtPreferences(); prefs.put(name, pref); } return pref; }
public Preferences getPreferences (String name) { Preferences pref = prefs.get(name); if(pref == null) { pref = new GwtPreferences(name); prefs.put(name, pref); } return pref; }
public boolean touchDown (int x, int y, int pointer, int button) { Vector2 current = getCurrentPosition(); position.set(current); targetPosition.set(x - 10, Gdx.graphics.getHeight() - y - 10); timer = 0; return true; } })); root = new Table(); stage.addActor(root); root.pad(10).top()....
public boolean touchDown (int x, int y, int pointer, int button) { Vector2 current = getCurrentPosition(); position.set(current); targetPosition.set(x - 10, Gdx.graphics.getHeight() - y - 10); timer = 0; return true; } })); root = new Table(); stage.addActor(root); root.pad(10).top()....
@Inject public MmapFsStore(ShardId shardId, @IndexSettings Settings indexSettings, IndexStore indexStore, ByteBufferCache byteBufferCache) throws IOException { super(shardId, indexSettings, indexStore); LockFactory lockFactory = buildLockFactory(); File location = ((FsIndexStore) indexStore)...
@Inject public MmapFsStore(ShardId shardId, @IndexSettings Settings indexSettings, IndexStore indexStore, ByteBufferCache byteBufferCache) throws IOException { super(shardId, indexSettings, indexStore); LockFactory lockFactory = buildLockFactory(); File location = ((FsIndexStore) indexStore)...
@Inject public NioFsStore(ShardId shardId, @IndexSettings Settings indexSettings, IndexStore indexStore, ByteBufferCache byteBufferCache) throws IOException { super(shardId, indexSettings, indexStore); LockFactory lockFactory = buildLockFactory(); File location = ((FsIndexStore) indexStore)....
@Inject public NioFsStore(ShardId shardId, @IndexSettings Settings indexSettings, IndexStore indexStore, ByteBufferCache byteBufferCache) throws IOException { super(shardId, indexSettings, indexStore); LockFactory lockFactory = buildLockFactory(); File location = ((FsIndexStore) indexStore)....
@Inject public SimpleFsStore(ShardId shardId, @IndexSettings Settings indexSettings, IndexStore indexStore, ByteBufferCache byteBufferCache) throws IOException { super(shardId, indexSettings, indexStore); LockFactory lockFactory = buildLockFactory(); File location = ((FsIndexStore) indexStor...
@Inject public SimpleFsStore(ShardId shardId, @IndexSettings Settings indexSettings, IndexStore indexStore, ByteBufferCache byteBufferCache) throws IOException { super(shardId, indexSettings, indexStore); LockFactory lockFactory = buildLockFactory(); File location = ((FsIndexStore) indexStor...
@Override protected Fieldable parseCreateField(ParseContext context) throws IOException { String dateAsString = null; Long value = null; float boost = this.boost; if (context.externalValueSet()) { Object externalValue = context.externalValue(); if (externalVal...
@Override protected Fieldable parseCreateField(ParseContext context) throws IOException { String dateAsString = null; Long value = null; float boost = this.boost; if (context.externalValueSet()) { Object externalValue = context.externalValue(); if (externalVal...
@Override protected Field parseCreateField(ParseContext context) throws IOException { String value = nullValue; float boost = this.boost; if (context.externalValueSet()) { value = (String) context.externalValue(); } else { XContentParser parser = context.parse...
@Override protected Field parseCreateField(ParseContext context) throws IOException { String value = nullValue; float boost = this.boost; if (context.externalValueSet()) { value = (String) context.externalValue(); } else { XContentParser parser = context.parse...
@Override protected Fieldable parseCreateField(ParseContext context) throws IOException { String ipAsString; if (context.externalValueSet()) { ipAsString = (String) context.externalValue(); if (ipAsString == null) { ipAsString = nullValue; } ...
@Override protected Fieldable parseCreateField(ParseContext context) throws IOException { String ipAsString; if (context.externalValueSet()) { ipAsString = (String) context.externalValue(); if (ipAsString == null) { ipAsString = nullValue; } ...
public byte[] readBytes () { int length = (int)length(); if (length == 0) length = 512; byte[] buffer = new byte[length]; int position = 0; InputStream input = read(); try { while (true) { int count = input.read(buffer, position, buffer.length - position); if (count == -1) break; position +=...
public byte[] readBytes () { int length = (int)length(); if (length == 0) length = 512; byte[] buffer = new byte[length]; int position = 0; InputStream input = read(); try { while (true) { int count = input.read(buffer, position, buffer.length - position); if (count == -1) break; position +=...
public TextButtonStyle (NinePatch down, NinePatch up, NinePatch checked, float pressedOffsetX, float pressedOffsetY, float unpressedOffsetX, float unpressedOffsetY, BitmapFont font, Color fontColor, Color downFontColor, Color checkedFontColor) { super(down, up, checked, pressedOffsetX, pressedOffsetY, unpres...
public TextButtonStyle (NinePatch down, NinePatch up, NinePatch checked, float pressedOffsetX, float pressedOffsetY, float unpressedOffsetX, float unpressedOffsetY, BitmapFont font, Color fontColor, Color downFontColor, Color checkedFontColor) { super(up, down, checked, pressedOffsetX, pressedOffsetY, unpres...
@Override public Facet reduce(String name, List<Facet> facets) { if (facets.size() == 1) { if (requiredSize == 0) { // we need to sort it here! InternalTermsStatsDoubleFacet tsFacet = (InternalTermsStatsDoubleFacet) facets.get(0); if (!tsFacet.entr...
@Override public Facet reduce(String name, List<Facet> facets) { if (facets.size() == 1) { if (requiredSize == 0) { // we need to sort it here! InternalTermsStatsDoubleFacet tsFacet = (InternalTermsStatsDoubleFacet) facets.get(0); if (!tsFacet.entr...
@Override public Facet reduce(String name, List<Facet> facets) { if (facets.size() == 1) { if (requiredSize == 0) { // we need to sort it here! InternalTermsStatsLongFacet tsFacet = (InternalTermsStatsLongFacet) facets.get(0); if (!tsFacet.entries....
@Override public Facet reduce(String name, List<Facet> facets) { if (facets.size() == 1) { if (requiredSize == 0) { // we need to sort it here! InternalTermsStatsLongFacet tsFacet = (InternalTermsStatsLongFacet) facets.get(0); if (!tsFacet.entries....
@Override public Facet reduce(String name, List<Facet> facets) { if (facets.size() == 1) { if (requiredSize == 0) { // we need to sort it here! InternalTermsStatsStringFacet tsFacet = (InternalTermsStatsStringFacet) facets.get(0); if (!tsFacet.entr...
@Override public Facet reduce(String name, List<Facet> facets) { if (facets.size() == 1) { if (requiredSize == 0) { // we need to sort it here! InternalTermsStatsStringFacet tsFacet = (InternalTermsStatsStringFacet) facets.get(0); if (!tsFacet.entr...
private static final ImmutableMap<String, PreBuiltPostingsFormatProvider.Factory> builtInPostingFormats; static { MapBuilder<String, PreBuiltPostingsFormatProvider.Factory> buildInPostingFormatsX = MapBuilder.newMapBuilder(); // add defaults ones for (String luceneName : PostingsFormat....
private static final ImmutableMap<String, PreBuiltPostingsFormatProvider.Factory> builtInPostingFormats; static { MapBuilder<String, PreBuiltPostingsFormatProvider.Factory> buildInPostingFormatsX = MapBuilder.newMapBuilder(); // add defaults ones for (String luceneName : PostingsFormat....
package com.badlogic.gdx.graphics.g3d.environment; package com.badlogic.gdx.graphics.g3d.lights; import com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor; import com.badlogic.gdx.math.Matrix4; public interface ShadowMap { Matrix4 getProjViewTrans(); TextureDescriptor getDepthMap(); }
package com.badlogic.gdx.graphics.g3d.environment; package com.badlogic.gdx.graphics.g3d.environment; import com.badlogic.gdx.graphics.g3d.utils.TextureDescriptor; import com.badlogic.gdx.math.Matrix4; public interface ShadowMap { Matrix4 getProjViewTrans(); TextureDescriptor getDepthMap(); }
public void dispose () { executor.shutdown(); try { executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); } catch (InterruptedException e) { new GdxRuntimeException("Couldn't shutdown loading thread"); } }
public void dispose () { executor.shutdown(); try { executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); } catch (InterruptedException e) { throw new GdxRuntimeException("Couldn't shutdown loading thread", e); } }
public void testFieldsWithCustomPostingsFormat() throws Exception { try { client.admin().indices().prepareDelete("test").execute().actionGet(); } catch (Exception e) { // ignore } client.admin().indices().prepareCreate("test") .addMapping("typ...
public void testFieldsWithCustomPostingsFormat() throws Exception { try { client.admin().indices().prepareDelete("test").execute().actionGet(); } catch (Exception e) { // ignore } client.admin().indices().prepareCreate("test") .addMapping("typ...
public float getAngleAroundRad (final float axisX, final float axisY, final float axisZ) { final float d = Vector3.dot(this.x, this.y, this.z, axisX, axisY, axisZ); final float l2 = Quaternion.len2(axisX * d, axisY * d, axisZ * d, this.w); return l2 == 0f ? 0f : (float)(2.0 * Math.acos(this.w / Math.sqrt(l2))); ...
public float getAngleAroundRad (final float axisX, final float axisY, final float axisZ) { final float d = Vector3.dot(this.x, this.y, this.z, axisX, axisY, axisZ); final float l2 = Quaternion.len2(axisX * d, axisY * d, axisZ * d, this.w); return MathUtils.isZero(l2) ? 0f : (float)(2.0 * Math.acos(this.w / Math....
protected void allocRenderable(){ renderable = new Renderable(); renderable.primitiveType = GL20.GL_POINTS; renderable.meshPartOffset = 0; renderable.material = new Material( new BlendingAttribute(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA, 1f), new DepthTestAttribute(GL20.GL_LEQUAL, false), TextureAttribu...
protected void allocRenderable(){ renderable = new Renderable(); renderable.primitiveType = GL20.GL_POINTS; renderable.meshPartOffset = 0; renderable.material = new Material( new BlendingAttribute(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA, 1f), new DepthTestAttribute(GL20.GL_LEQUAL, false), TextureAttribu...
public String toString () { return x + "," + y + "," + z; }
public String toString () { return "[" + x + ", " + y + ", " + z + "]"; }
@Override public int size() { return operations.size(); }
@Override public int size() { return operationCounter.get(); }
public boolean contains (float x, float y) { return this.x < x && this.x + this.width > x && this.y < y && this.y + this.height > y; }
public boolean contains (float x, float y) { return this.x <= x && this.x + this.width >= x && this.y <= y && this.y + this.height >= y; }
public FileHandle[] list (String suffix) { if (type == FileType.Internal) { try { String[] relativePaths = assets.list(file.getPath()); FileHandle[] handles = new FileHandle[relativePaths.length]; int count = 0; for (int i = 0, n = handles.length; i < n; i++) { String path = relativePaths[i];...
public FileHandle[] list (String suffix) { if (type == FileType.Internal) { try { String[] relativePaths = assets.list(file.getPath()); FileHandle[] handles = new FileHandle[relativePaths.length]; int count = 0; for (int i = 0, n = handles.length; i < n; i++) { String path = relativePaths[i];...
protected btStridingMeshInterface meshInterface = null;
public synchronized void delete() { if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; gdxBulletJNI.delete_btBvhTriangleMeshShape(swigCPtr); } swigCPtr = 0; } super.delete(); dispose(); } btStridingMeshInterface meshInterface = null;
public void render () { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl10.glColor4f(1, 1, 1, 1); renderer.setProjectionMatrix(camera.combined); renderer.setColor(1, 1, 1, 1); renderer.begin(ShapeType.Line); for (int j = 0; j < coords.length - 2; j += 2) { renderer.line(coords[j], coords[j + 1], coords...
public void render () { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); Gdx.gl10.glColor4f(1, 1, 1, 1); renderer.setProjectionMatrix(camera.combined); renderer.setColor(1, 1, 1, 1); renderer.begin(ShapeType.Line); for (int j = 0; j < coords.length - 2; j += 2) { renderer.line(coords[j], coords[j + 1], coords...
public void render () { // red.a = (red.a + Gdx.graphics.getDeltaTime() * 0.1f) % 1; int viewHeight = Gdx.graphics.getHeight(); Gdx.gl.glClearColor(1, 1, 1, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); spriteBatch.begin(); String text = "Sphinx of black quartz, judge my vow."; font.setColor(Color.RED...
public void render () { // red.a = (red.a + Gdx.graphics.getDeltaTime() * 0.1f) % 1; int viewHeight = Gdx.graphics.getHeight(); Gdx.gl.glClearColor(1, 1, 1, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); spriteBatch.begin(); String text = "Sphinx of black quartz, judge my vow."; font.setColor(Color.RED...
private void renderBox (Body body, float halfWidth, float halfHeight) { // get the bodies center and angle in world coordinates Vector2 pos = body.getWorldCenter(); float angle = body.getAngle(); // set the translation and rotation matrix transform.setToTranslation(pos.x, pos.y, 0); transform.rotate(0, 0,...
private void renderBox (Body body, float halfWidth, float halfHeight) { // get the bodies center and angle in world coordinates Vector2 pos = body.getWorldCenter(); float angle = body.getAngle(); // set the translation and rotation matrix transform.setToTranslation(pos.x, pos.y, 0); transform.rotate(0, 0,...
public void render () { time += Gdx.graphics.getDeltaTime(); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); batch.begin(); // badlogic.draw(batch); // star.draw(batch); // font.draw(batch, "This font was packed!", 26, 65); badlogicSmall.draw(batch); renderer.begin(ShapeType.Line); renderer.rect(10, 10, 25...
public void render () { time += Gdx.graphics.getDeltaTime(); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); batch.begin(); // badlogic.draw(batch); // star.draw(batch); // font.draw(batch, "This font was packed!", 26, 65); badlogicSmall.draw(batch); renderer.begin(ShapeType.Rectangle); renderer.rect(10, 1...
public void create () { super.create(); internalTickCallback = new TestInternalTickCallback((btDynamicsWorld)world.collisionWorld);
public void create () { super.create(); internalTickCallback = new TestInternalTickCallback(world.dynamicsWorld);
public boolean tap (float x, float y, int count, int button) { Ray ray = camera.getPickRay(x, y); rayFrom.set(ray.origin); rayTo.set(ray.direction).mul(50f).add(rayFrom); // 50 meters max from the origin // Because we reuse the ClosestRayResultCallback, we need reset it's values rayTestCB.setM_collisionObje...
public boolean tap (float x, float y, int count, int button) { Ray ray = camera.getPickRay(x, y); rayFrom.set(ray.origin); rayTo.set(ray.direction).mul(50f).add(rayFrom); // 50 meters max from the origin // Because we reuse the ClosestRayResultCallback, we need reset it's values rayTestCB.setM_collisionObje...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class, ...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class, ...
public void writeGenericValue(@Nullable Object value) throws IOException { if (value == null) { writeByte((byte) -1); return; } Class type = value.getClass(); if (type == String.class) { writeByte((byte) 0); writeString((String) value);...
public void writeGenericValue(@Nullable Object value) throws IOException { if (value == null) { writeByte((byte) -1); return; } Class type = value.getClass(); if (type == String.class) { writeByte((byte) 0); writeString((String) value);...
public Cell add (Actor actor) { return layout.add(actor); }
public Cell add (Actor actor) { return layout.add(actor == null ? new Actor() : actor); }