void ISimpleSubtractorImpl::Train(const unsigned char *in_img, const unsigned int in_num_rows, const unsigned int in_num_cols, const unsigned int in_img_step) { m_num_rows = in_num_rows; m_num_cols = in_num_cols; AllocateModel(); InitializeModel(in_img, in_img_step); }
GameObject::GameObject(string name, string tag, Texture* texture, TextureShader* shader, ID3D11Device* device, D3DXVECTOR3 position, D3DXVECTOR3 rotation, D3DXVECTOR3 scale) : GameObject() { myName = name; myTag = tag; myTexture = texture; myShader = shader; InitializeModel(device, position, rotation, scale); animationLastFrame = System::frameCount; }
void RecalibrationModel::Initialize(OptArgs& opts, vector<string> &bam_comments, const string & run_id, const ion::ChipSubset & chip_subset) { string model_file_name = opts.GetFirstString ('-', "model-file", ""); int model_threshold = opts.GetFirstInt('-', "recal-model-hp-thres", 4); bool save_hpmodel = opts.GetFirstBoolean('-', "save-hpmodel", true); bool diagonal_state_prog = opts.GetFirstBoolean('-', "diagonal-state-prog", false); if (diagonal_state_prog) model_file_name.clear(); if (InitializeModel(model_file_name, model_threshold) and save_hpmodel) SaveModelFileToBamComments(model_file_name, bam_comments, run_id, chip_subset.GetColOffset(), chip_subset.GetRowOffset()); }
/* This class represents a simple airplane model built out of cube and prism game model components It can be moved forward in the direction it is facing and turned left or right. Exercise: it would be cool if it actually banked while turning. How would you do this? */ CarModel::CarModel() { m_WheelFL = 0; m_WheelFR = 0; m_WheelBL = 0; m_WheelBR = 0; m_Body = 0; //direction plane is facing as constructed in the model co-ordinates m_directionVector = XMFLOAT3(1.0f,0.0f,0.0f); //face in positive X direction InitializeModel(); }
GameObject::GameObject(string name, string tag, Texture* textures[], unsigned int textureCount, TextureShader* shader, ID3D11Device* device, D3DXVECTOR3 position, D3DXVECTOR3 rotation, D3DXVECTOR3 scale) : GameObject() { myName = name; myTag = tag; for (int i = 0; i < textureCount; i++) animationTextures.push_back(textures[i]); currentTextureID = 0; myTexture = animationTextures.at(currentTextureID); myShader = shader; InitializeModel(device, position, rotation, scale); }
EnemyModel::EnemyModel(float x, float y, float z, float s) { m_Head = 0; m_Torso = 0; m_LeftArm = 0; m_RightArm = 0; m_LeftLeg = 0; m_RightLeg = 0; m_InitialPosition = XMFLOAT3(x, y, z); m_scale = s; InitializeModel(); }
CubeModel::CubeModel(float lengthX, float lengthY, float lengthZ, XMFLOAT4 * pColors) : GameModel() { InitializeModel(lengthX, lengthY, lengthZ, pColors); }
PrismTexturedModel::PrismTexturedModel(float height, float radius, int nFaces, WCHAR** pTextureFileNames) : GameModel() { InitializeModel(height, radius, nFaces, pTextureFileNames); }
int SimpleTUI::run(int argc, char *argv[]) { clock_t main_clock_start = clock(); EvalLog::curr_inst_start_time = get_time_second(); const char *program = (argc > 0) ? argv[0] : "despot"; argc -= (argc > 0); argv += (argc > 0); // skip program name argv[0] if present option::Stats stats(usage, argc, argv); option::Option *options = new option::Option[stats.options_max]; option::Option *buffer = new option::Option[stats.buffer_max]; option::Parser parse(usage, argc, argv, options, buffer); string solver_type = "DESPOT"; bool search_solver; /* ========================= * Parse required parameters * =========================*/ int num_runs = 1; string simulator_type = "pomdp"; string belief_type = "DEFAULT"; int time_limit = -1; /* ========================================= * Problem specific default parameter values *=========================================*/ InitializeDefaultParameters(); /* ========================= * Parse optional parameters * =========================*/ if (options[E_HELP]) { cout << "Usage: " << program << " [options]" << endl; option::printUsage(std::cout, usage); return 0; } OptionParse(options, num_runs, simulator_type, belief_type, time_limit, solver_type, search_solver); /* ========================= * Global random generator * =========================*/ Seeds::root_seed(Globals::config.root_seed); unsigned world_seed = Seeds::Next(); unsigned seed = Seeds::Next(); Random::RANDOM = Random(seed); /* ========================= * initialize model * =========================*/ DSPOMDP *model = InitializeModel(options); /* ========================= * initialize solver * =========================*/ Solver *solver = InitializeSolver(model, solver_type, options); assert(solver != NULL); /* ========================= * initialize simulator * =========================*/ Evaluator *simulator = NULL; InitializeEvaluator(simulator, options, model, solver, num_runs, main_clock_start, simulator_type, belief_type, time_limit, solver_type); simulator->world_seed(world_seed); int start_run = 0; /* ========================= * Display parameters * =========================*/ DisplayParameters(options, model); /* ========================= * run simulator * =========================*/ RunEvaluator(model, simulator, options, num_runs, search_solver, solver, simulator_type, main_clock_start, start_run); simulator->End(); PrintResult(num_runs, simulator, main_clock_start); return 0; }
CubeTexturedModel::CubeTexturedModel(float lengthX, float lengthY, float lengthZ, WCHAR** pTextureFileNames) : GameModel() { InitializeModel(lengthX, lengthY, lengthZ, pTextureFileNames); }
void XYZaxis::Initialize() { InitializeModel(); }